import { jsx as P, jsxs as ve } from "openinula/jsx-runtime";
import * as w from "openinula";
import F, { createContext as Nt, useMemo as Fe, createElement as v, useContext as Qt, useCallback as re, forwardRef as _, Children as Ke, isValidElement as Rt, cloneElement as wn, Fragment as Ge, useRef as A, useEffect as j, useState as q, useLayoutEffect as dr, useReducer as ec } from "openinula";
import * as Cm from "openinula";
import tc, { flushSync as ur, createPortal as nc } from "openinula";
function S() {
  return S = Object.assign ? Object.assign.bind() : function(e) {
    for (var t = 1; t < arguments.length; t++) {
      var n = arguments[t];
      for (var o in n)
        Object.prototype.hasOwnProperty.call(n, o) && (e[o] = n[o]);
    }
    return e;
  }, S.apply(this, arguments);
}
function Sm(e, t) {
  const n = /* @__PURE__ */ Nt(t);
  function o(a) {
    const { children: c, ...s } = a, i = Fe(
      () => s,
      Object.values(s)
    );
    return /* @__PURE__ */ v(n.Provider, {
      value: i
    }, c);
  }
  function r(a) {
    const c = Qt(n);
    if (c)
      return c;
    if (t !== void 0)
      return t;
    throw new Error(`\`${a}\` must be used within \`${e}\``);
  }
  return o.displayName = e + "Provider", [
    o,
    r
  ];
}
function we(e, t = []) {
  let n = [];
  function o(a, c) {
    const s = /* @__PURE__ */ Nt(c), i = n.length;
    n = [
      ...n,
      c
    ];
    function l(d) {
      const { scope: f, children: m, ...b } = d, p = (f == null ? void 0 : f[e][i]) || s, g = Fe(
        () => b,
        Object.values(b)
      );
      return /* @__PURE__ */ v(p.Provider, {
        value: g
      }, m);
    }
    function u(d, f) {
      const m = (f == null ? void 0 : f[e][i]) || s, b = Qt(m);
      if (b)
        return b;
      if (c !== void 0)
        return c;
      throw new Error(`\`${d}\` must be used within \`${a}\``);
    }
    return l.displayName = a + "Provider", [
      l,
      u
    ];
  }
  const r = () => {
    const a = n.map((c) => /* @__PURE__ */ Nt(c));
    return function(s) {
      const i = (s == null ? void 0 : s[e]) || a;
      return Fe(
        () => ({
          [`__scope${e}`]: {
            ...s,
            [e]: i
          }
        }),
        [
          s,
          i
        ]
      );
    };
  };
  return r.scopeName = e, [
    o,
    Em(r, ...t)
  ];
}
function Em(...e) {
  const t = e[0];
  if (e.length === 1)
    return t;
  const n = () => {
    const o = e.map(
      (r) => ({
        useScope: r(),
        scopeName: r.scopeName
      })
    );
    return function(a) {
      const c = o.reduce((s, { useScope: i, scopeName: l }) => {
        const d = i(a)[`__scope${l}`];
        return {
          ...s,
          ...d
        };
      }, {});
      return Fe(
        () => ({
          [`__scope${t.scopeName}`]: c
        }),
        [
          c
        ]
      );
    };
  };
  return n.scopeName = t.scopeName, n;
}
function Pm(e, t) {
  typeof e == "function" ? e(t) : e != null && (e.current = t);
}
function fo(...e) {
  return (t) => e.forEach(
    (n) => Pm(n, t)
  );
}
function ae(...e) {
  return re(fo(...e), e);
}
const gt = /* @__PURE__ */ _((e, t) => {
  const { children: n, ...o } = e, r = Ke.toArray(n), a = r.find(_m);
  if (a) {
    const c = a.props.children, s = r.map((i) => i === a ? Ke.count(c) > 1 ? Ke.only(null) : /* @__PURE__ */ Rt(c) ? c.props.children : null : i);
    return /* @__PURE__ */ v($a, S({}, o, {
      ref: t
    }), /* @__PURE__ */ Rt(c) ? /* @__PURE__ */ wn(c, void 0, s) : null);
  }
  return /* @__PURE__ */ v($a, S({}, o, {
    ref: t
  }), n);
});
gt.displayName = "Slot";
const $a = /* @__PURE__ */ _((e, t) => {
  const { children: n, ...o } = e;
  return /* @__PURE__ */ Rt(n) ? /* @__PURE__ */ wn(n, {
    ...Tm(o, n.props),
    ref: t ? fo(t, n.ref) : n.ref
  }) : Ke.count(n) > 1 ? Ke.only(null) : null;
});
$a.displayName = "SlotClone";
const oc = ({ children: e }) => /* @__PURE__ */ v(Ge, null, e);
function _m(e) {
  return /* @__PURE__ */ Rt(e) && e.type === oc;
}
function Tm(e, t) {
  const n = {
    ...t
  };
  for (const o in t) {
    const r = e[o], a = t[o];
    /^on[A-Z]/.test(o) ? r && a ? n[o] = (...s) => {
      a(...s), r(...s);
    } : r && (n[o] = r) : o === "style" ? n[o] = {
      ...r,
      ...a
    } : o === "className" && (n[o] = [
      r,
      a
    ].filter(Boolean).join(" "));
  }
  return {
    ...e,
    ...n
  };
}
function wt(e) {
  const t = e + "CollectionProvider", [n, o] = we(t), [r, a] = n(t, {
    collectionRef: {
      current: null
    },
    itemMap: /* @__PURE__ */ new Map()
  }), c = (m) => {
    const { scope: b, children: p } = m, g = F.useRef(null), h = F.useRef(/* @__PURE__ */ new Map()).current;
    return /* @__PURE__ */ F.createElement(r, {
      scope: b,
      itemMap: h,
      collectionRef: g
    }, p);
  }, s = e + "CollectionSlot", i = /* @__PURE__ */ F.forwardRef((m, b) => {
    const { scope: p, children: g } = m, h = a(s, p), $ = ae(b, h.collectionRef);
    return /* @__PURE__ */ F.createElement(gt, {
      ref: $
    }, g);
  }), l = e + "CollectionItemSlot", u = "data-radix-collection-item", d = /* @__PURE__ */ F.forwardRef((m, b) => {
    const { scope: p, children: g, ...h } = m, $ = F.useRef(null), x = ae(b, $), C = a(l, p);
    return F.useEffect(() => (C.itemMap.set($, {
      ref: $,
      ...h
    }), () => void C.itemMap.delete($))), /* @__PURE__ */ F.createElement(gt, {
      [u]: "",
      ref: x
    }, g);
  });
  function f(m) {
    const b = a(e + "CollectionConsumer", m);
    return F.useCallback(() => {
      const g = b.collectionRef.current;
      if (!g)
        return [];
      const h = Array.from(g.querySelectorAll(`[${u}]`));
      return Array.from(b.itemMap.values()).sort(
        (C, y) => h.indexOf(C.ref.current) - h.indexOf(y.ref.current)
      );
    }, [
      b.collectionRef,
      b.itemMap
    ]);
  }
  return [
    {
      Provider: c,
      Slot: i,
      ItemSlot: d
    },
    f,
    o
  ];
}
function O(e, t, { checkForDefaultPrevented: n = !0 } = {}) {
  return function(r) {
    if (e == null || e(r), n === !1 || !r.defaultPrevented)
      return t == null ? void 0 : t(r);
  };
}
function ge(e) {
  const t = A(e);
  return j(() => {
    t.current = e;
  }), Fe(
    () => (...n) => {
      var o;
      return (o = t.current) === null || o === void 0 ? void 0 : o.call(t, ...n);
    },
    []
  );
}
function Se({ prop: e, defaultProp: t, onChange: n = () => {
} }) {
  const [o, r] = Nm({
    defaultProp: t,
    onChange: n
  }), a = e !== void 0, c = a ? e : o, s = ge(n), i = re((l) => {
    if (a) {
      const d = typeof l == "function" ? l(e) : l;
      d !== e && s(d);
    } else
      r(l);
  }, [
    a,
    e,
    r,
    s
  ]);
  return [
    c,
    i
  ];
}
function Nm({ defaultProp: e, onChange: t }) {
  const n = q(e), [o] = n, r = A(o), a = ge(t);
  return j(() => {
    r.current !== o && (a(o), r.current = o);
  }, [
    o,
    r,
    a
  ]), n;
}
const Rm = [
  "a",
  "button",
  "div",
  "form",
  "h2",
  "h3",
  "img",
  "input",
  "label",
  "li",
  "nav",
  "ol",
  "p",
  "span",
  "svg",
  "ul"
], Z = Rm.reduce((e, t) => {
  const n = /* @__PURE__ */ _((o, r) => {
    const { asChild: a, ...c } = o, s = a ? gt : t;
    return j(() => {
      window[Symbol.for("radix-ui")] = !0;
    }, []), /* @__PURE__ */ v(s, S({}, c, {
      ref: r
    }));
  });
  return n.displayName = `Primitive.${t}`, {
    ...e,
    [t]: n
  };
}, {});
function Xn(e, t) {
  e && ur(
    () => e.dispatchEvent(t)
  );
}
const Re = globalThis != null && globalThis.document ? dr : () => {
};
function Am(e, t) {
  return ec((n, o) => {
    const r = t[n][o];
    return r ?? n;
  }, e);
}
const Ee = (e) => {
  const { present: t, children: n } = e, o = Mm(t), r = typeof n == "function" ? n({
    present: o.isPresent
  }) : Ke.only(n), a = ae(o.ref, r.ref);
  return typeof n == "function" || o.isPresent ? /* @__PURE__ */ wn(r, {
    ref: a
  }) : null;
};
Ee.displayName = "Presence";
function Mm(e) {
  const [t, n] = q(), o = A({}), r = A(e), a = A("none"), c = e ? "mounted" : "unmounted", [s, i] = Am(c, {
    mounted: {
      UNMOUNT: "unmounted",
      ANIMATION_OUT: "unmountSuspended"
    },
    unmountSuspended: {
      MOUNT: "mounted",
      ANIMATION_END: "unmounted"
    },
    unmounted: {
      MOUNT: "mounted"
    }
  });
  return j(() => {
    const l = Ro(o.current);
    a.current = s === "mounted" ? l : "none";
  }, [
    s
  ]), Re(() => {
    const l = o.current, u = r.current;
    if (u !== e) {
      const f = a.current, m = Ro(l);
      e ? i("MOUNT") : m === "none" || (l == null ? void 0 : l.display) === "none" ? i("UNMOUNT") : i(u && f !== m ? "ANIMATION_OUT" : "UNMOUNT"), r.current = e;
    }
  }, [
    e,
    i
  ]), Re(() => {
    if (t) {
      const l = (d) => {
        const m = Ro(o.current).includes(d.animationName);
        d.target === t && m && ur(
          () => i("ANIMATION_END")
        );
      }, u = (d) => {
        d.target === t && (a.current = Ro(o.current));
      };
      return t.addEventListener("animationstart", u), t.addEventListener("animationcancel", l), t.addEventListener("animationend", l), () => {
        t.removeEventListener("animationstart", u), t.removeEventListener("animationcancel", l), t.removeEventListener("animationend", l);
      };
    } else
      i("ANIMATION_END");
  }, [
    t,
    i
  ]), {
    isPresent: [
      "mounted",
      "unmountSuspended"
    ].includes(s),
    ref: re((l) => {
      l && (o.current = getComputedStyle(l)), n(l);
    }, [])
  };
}
function Ro(e) {
  return (e == null ? void 0 : e.animationName) || "none";
}
const Dm = w.useId || (() => {
});
let Im = 0;
function Me(e) {
  const [t, n] = w.useState(Dm());
  return Re(() => {
    e || n(
      (o) => o ?? String(Im++)
    );
  }, [
    e
  ]), e || (t ? `radix-${t}` : "");
}
const Ii = "Collapsible", [Om, Oi] = we(Ii), [km, rc] = Om(Ii), Lm = /* @__PURE__ */ _((e, t) => {
  const { __scopeCollapsible: n, open: o, defaultOpen: r, disabled: a, onOpenChange: c, ...s } = e, [i = !1, l] = Se({
    prop: o,
    defaultProp: r,
    onChange: c
  });
  return /* @__PURE__ */ v(km, {
    scope: n,
    disabled: a,
    contentId: Me(),
    open: i,
    onOpenToggle: re(
      () => l(
        (u) => !u
      ),
      [
        l
      ]
    )
  }, /* @__PURE__ */ v(Z.div, S({
    "data-state": ac(i),
    "data-disabled": a ? "" : void 0
  }, s, {
    ref: t
  })));
}), Fm = "CollapsibleTrigger", ki = /* @__PURE__ */ _((e, t) => {
  const { __scopeCollapsible: n, ...o } = e, r = rc(Fm, n);
  return /* @__PURE__ */ v(Z.button, S({
    type: "button",
    "aria-controls": r.contentId,
    "aria-expanded": r.open || !1,
    "data-state": ac(r.open),
    "data-disabled": r.disabled ? "" : void 0,
    disabled: r.disabled
  }, o, {
    ref: t,
    onClick: O(e.onClick, r.onOpenToggle)
  }));
}), Li = "CollapsibleContent", Fi = /* @__PURE__ */ _((e, t) => {
  const { forceMount: n, ...o } = e, r = rc(Li, e.__scopeCollapsible);
  return /* @__PURE__ */ v(
    Ee,
    {
      present: n || r.open
    },
    ({ present: a }) => /* @__PURE__ */ v(zm, S({}, o, {
      ref: t,
      present: a
    }))
  );
}), zm = /* @__PURE__ */ _((e, t) => {
  const { __scopeCollapsible: n, present: o, children: r, ...a } = e, c = rc(Li, n), [s, i] = q(o), l = A(null), u = ae(t, l), d = A(0), f = d.current, m = A(0), b = m.current, p = c.open || s, g = A(p), h = A();
  return j(() => {
    const $ = requestAnimationFrame(
      () => g.current = !1
    );
    return () => cancelAnimationFrame($);
  }, []), Re(() => {
    const $ = l.current;
    if ($) {
      h.current = h.current || {
        transitionDuration: $.style.transitionDuration,
        animationName: $.style.animationName
      }, $.style.transitionDuration = "0s", $.style.animationName = "none";
      const x = $.getBoundingClientRect();
      d.current = x.height, m.current = x.width, g.current || ($.style.transitionDuration = h.current.transitionDuration, $.style.animationName = h.current.animationName), i(o);
    }
  }, [
    c.open,
    o
  ]), /* @__PURE__ */ v(Z.div, S({
    "data-state": ac(c.open),
    "data-disabled": c.disabled ? "" : void 0,
    id: c.contentId,
    hidden: !p
  }, a, {
    ref: u,
    style: {
      "--radix-collapsible-content-height": f ? `${f}px` : void 0,
      "--radix-collapsible-content-width": b ? `${b}px` : void 0,
      ...e.style
    }
  }), p && r);
});
function ac(e) {
  return e ? "open" : "closed";
}
const zi = Lm, Vm = ki, Hm = Fi, Bm = /* @__PURE__ */ Nt(void 0);
function rt(e) {
  const t = Qt(Bm);
  return e || t || "ltr";
}
const It = "Accordion", Km = [
  "Home",
  "End",
  "ArrowDown",
  "ArrowUp",
  "ArrowLeft",
  "ArrowRight"
], [cc, Gm, Um] = wt(It), [fr, R7] = we(It, [
  Um,
  Oi
]), sc = Oi(), Vi = /* @__PURE__ */ F.forwardRef((e, t) => {
  const { type: n, ...o } = e, r = o, a = o;
  return /* @__PURE__ */ F.createElement(cc.Provider, {
    scope: e.__scopeAccordion
  }, n === "multiple" ? /* @__PURE__ */ F.createElement(Xm, S({}, a, {
    ref: t
  })) : /* @__PURE__ */ F.createElement(Ym, S({}, r, {
    ref: t
  })));
});
Vi.propTypes = {
  type(e) {
    const t = e.value || e.defaultValue;
    return e.type && ![
      "single",
      "multiple"
    ].includes(e.type) ? new Error("Invalid prop `type` supplied to `Accordion`. Expected one of `single | multiple`.") : e.type === "multiple" && typeof t == "string" ? new Error("Invalid prop `type` supplied to `Accordion`. Expected `single` when `defaultValue` or `value` is type `string`.") : e.type === "single" && Array.isArray(t) ? new Error("Invalid prop `type` supplied to `Accordion`. Expected `multiple` when `defaultValue` or `value` is type `string[]`.") : null;
  }
};
const [Hi, Wm] = fr(It), [Bi, jm] = fr(It, {
  collapsible: !1
}), Ym = /* @__PURE__ */ F.forwardRef((e, t) => {
  const { value: n, defaultValue: o, onValueChange: r = () => {
  }, collapsible: a = !1, ...c } = e, [s, i] = Se({
    prop: n,
    defaultProp: o,
    onChange: r
  });
  return /* @__PURE__ */ F.createElement(Hi, {
    scope: e.__scopeAccordion,
    value: s ? [
      s
    ] : [],
    onItemOpen: i,
    onItemClose: F.useCallback(
      () => a && i(""),
      [
        a,
        i
      ]
    )
  }, /* @__PURE__ */ F.createElement(Bi, {
    scope: e.__scopeAccordion,
    collapsible: a
  }, /* @__PURE__ */ F.createElement(Ki, S({}, c, {
    ref: t
  }))));
}), Xm = /* @__PURE__ */ F.forwardRef((e, t) => {
  const { value: n, defaultValue: o, onValueChange: r = () => {
  }, ...a } = e, [c = [], s] = Se({
    prop: n,
    defaultProp: o,
    onChange: r
  }), i = F.useCallback(
    (u) => s(
      (d = []) => [
        ...d,
        u
      ]
    ),
    [
      s
    ]
  ), l = F.useCallback(
    (u) => s(
      (d = []) => d.filter(
        (f) => f !== u
      )
    ),
    [
      s
    ]
  );
  return /* @__PURE__ */ F.createElement(Hi, {
    scope: e.__scopeAccordion,
    value: c,
    onItemOpen: i,
    onItemClose: l
  }, /* @__PURE__ */ F.createElement(Bi, {
    scope: e.__scopeAccordion,
    collapsible: !0
  }, /* @__PURE__ */ F.createElement(Ki, S({}, a, {
    ref: t
  }))));
}), [qm, pr] = fr(It), Ki = /* @__PURE__ */ F.forwardRef((e, t) => {
  const { __scopeAccordion: n, disabled: o, dir: r, orientation: a = "vertical", ...c } = e, s = F.useRef(null), i = ae(s, t), l = Gm(n), d = rt(r) === "ltr", f = O(e.onKeyDown, (m) => {
    var b;
    if (!Km.includes(m.key))
      return;
    const p = m.target, g = l().filter((N) => {
      var H;
      return !((H = N.ref.current) !== null && H !== void 0 && H.disabled);
    }), h = g.findIndex(
      (N) => N.ref.current === p
    ), $ = g.length;
    if (h === -1)
      return;
    m.preventDefault();
    let x = h;
    const C = 0, y = $ - 1, E = () => {
      x = h + 1, x > y && (x = C);
    }, T = () => {
      x = h - 1, x < C && (x = y);
    };
    switch (m.key) {
      case "Home":
        x = C;
        break;
      case "End":
        x = y;
        break;
      case "ArrowRight":
        a === "horizontal" && (d ? E() : T());
        break;
      case "ArrowDown":
        a === "vertical" && E();
        break;
      case "ArrowLeft":
        a === "horizontal" && (d ? T() : E());
        break;
      case "ArrowUp":
        a === "vertical" && T();
        break;
    }
    const R = x % $;
    (b = g[R].ref.current) === null || b === void 0 || b.focus();
  });
  return /* @__PURE__ */ F.createElement(qm, {
    scope: n,
    disabled: o,
    direction: r,
    orientation: a
  }, /* @__PURE__ */ F.createElement(cc.Slot, {
    scope: n
  }, /* @__PURE__ */ F.createElement(Z.div, S({}, c, {
    "data-orientation": a,
    ref: i,
    onKeyDown: o ? void 0 : f
  }))));
}), xa = "AccordionItem", [Zm, ic] = fr(xa), Qm = /* @__PURE__ */ F.forwardRef((e, t) => {
  const { __scopeAccordion: n, value: o, ...r } = e, a = pr(xa, n), c = Wm(xa, n), s = sc(n), i = Me(), l = o && c.value.includes(o) || !1, u = a.disabled || e.disabled;
  return /* @__PURE__ */ F.createElement(Zm, {
    scope: n,
    open: l,
    disabled: u,
    triggerId: i
  }, /* @__PURE__ */ F.createElement(zi, S({
    "data-orientation": a.orientation,
    "data-state": Gi(l)
  }, s, r, {
    ref: t,
    disabled: u,
    open: l,
    onOpenChange: (d) => {
      d ? c.onItemOpen(o) : c.onItemClose(o);
    }
  })));
}), Jm = "AccordionHeader", eb = /* @__PURE__ */ F.forwardRef((e, t) => {
  const { __scopeAccordion: n, ...o } = e, r = pr(It, n), a = ic(Jm, n);
  return /* @__PURE__ */ F.createElement(Z.h3, S({
    "data-orientation": r.orientation,
    "data-state": Gi(a.open),
    "data-disabled": a.disabled ? "" : void 0
  }, o, {
    ref: t
  }));
}), hs = "AccordionTrigger", tb = /* @__PURE__ */ F.forwardRef((e, t) => {
  const { __scopeAccordion: n, ...o } = e, r = pr(It, n), a = ic(hs, n), c = jm(hs, n), s = sc(n);
  return /* @__PURE__ */ F.createElement(cc.ItemSlot, {
    scope: n
  }, /* @__PURE__ */ F.createElement(Vm, S({
    "aria-disabled": a.open && !c.collapsible || void 0,
    "data-orientation": r.orientation,
    id: a.triggerId
  }, s, o, {
    ref: t
  })));
}), nb = "AccordionContent", ob = /* @__PURE__ */ F.forwardRef((e, t) => {
  const { __scopeAccordion: n, ...o } = e, r = pr(It, n), a = ic(nb, n), c = sc(n);
  return /* @__PURE__ */ F.createElement(Hm, S({
    role: "region",
    "aria-labelledby": a.triggerId,
    "data-orientation": r.orientation
  }, c, o, {
    ref: t,
    style: {
      "--radix-accordion-content-height": "var(--radix-collapsible-content-height)",
      "--radix-accordion-content-width": "var(--radix-collapsible-content-width)",
      ...e.style
    }
  }));
});
function Gi(e) {
  return e ? "open" : "closed";
}
const rb = Vi, ab = Qm, cb = eb, Ui = tb, Wi = ob;
/**
 * @license lucide-react v0.298.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */
var sb = {
  xmlns: "http://www.w3.org/2000/svg",
  width: 24,
  height: 24,
  viewBox: "0 0 24 24",
  fill: "none",
  stroke: "currentColor",
  strokeWidth: 2,
  strokeLinecap: "round",
  strokeLinejoin: "round"
};
/**
 * @license lucide-react v0.298.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */
const ib = (e) => e.replace(/([a-z0-9])([A-Z])/g, "$1-$2").toLowerCase().trim(), Qe = (e, t) => {
  const n = _(
    ({ color: o = "currentColor", size: r = 24, strokeWidth: a = 2, absoluteStrokeWidth: c, className: s = "", children: i, ...l }, u) => v(
      "svg",
      {
        ref: u,
        ...sb,
        width: r,
        height: r,
        stroke: o,
        strokeWidth: c ? Number(a) * 24 / Number(r) : a,
        className: ["lucide", `lucide-${ib(e)}`, s].join(" "),
        ...l
      },
      [
        ...t.map(([d, f]) => v(d, f)),
        ...Array.isArray(i) ? i : [i]
      ]
    )
  );
  return n.displayName = `${e}`, n;
};
/**
 * @license lucide-react v0.298.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */
const lb = Qe("ArrowLeft", [
  ["path", { d: "m12 19-7-7 7-7", key: "1l729n" }],
  ["path", { d: "M19 12H5", key: "x3x0zl" }]
]);
/**
 * @license lucide-react v0.298.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */
const db = Qe("ArrowRight", [
  ["path", { d: "M5 12h14", key: "1ays0h" }],
  ["path", { d: "m12 5 7 7-7 7", key: "xquz4c" }]
]);
/**
 * @license lucide-react v0.298.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */
const po = Qe("Check", [["path", { d: "M20 6 9 17l-5-5", key: "1gmf2c" }]]);
/**
 * @license lucide-react v0.298.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */
const mr = Qe("ChevronDown", [
  ["path", { d: "m6 9 6 6 6-6", key: "qrunsl" }]
]);
/**
 * @license lucide-react v0.298.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */
const ub = Qe("ChevronLeft", [
  ["path", { d: "m15 18-6-6 6-6", key: "1wnfg3" }]
]);
/**
 * @license lucide-react v0.298.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */
const br = Qe("ChevronRight", [
  ["path", { d: "m9 18 6-6-6-6", key: "mthhwq" }]
]);
/**
 * @license lucide-react v0.298.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */
const fb = Qe("ChevronUp", [["path", { d: "m18 15-6-6-6 6", key: "153udz" }]]);
/**
 * @license lucide-react v0.298.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */
const vr = Qe("Circle", [
  ["circle", { cx: "12", cy: "12", r: "10", key: "1mglay" }]
]);
/**
 * @license lucide-react v0.298.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */
const pb = Qe("GripVertical", [
  ["circle", { cx: "9", cy: "12", r: "1", key: "1vctgf" }],
  ["circle", { cx: "9", cy: "5", r: "1", key: "hp0tcf" }],
  ["circle", { cx: "9", cy: "19", r: "1", key: "fkjjf6" }],
  ["circle", { cx: "15", cy: "12", r: "1", key: "1tmaij" }],
  ["circle", { cx: "15", cy: "5", r: "1", key: "19l28e" }],
  ["circle", { cx: "15", cy: "19", r: "1", key: "f4zoj3" }]
]);
/**
 * @license lucide-react v0.298.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */
const mb = Qe("MoreHorizontal", [
  ["circle", { cx: "12", cy: "12", r: "1", key: "41hilf" }],
  ["circle", { cx: "19", cy: "12", r: "1", key: "1wjl8i" }],
  ["circle", { cx: "5", cy: "12", r: "1", key: "1pcz8c" }]
]);
/**
 * @license lucide-react v0.298.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */
const bb = Qe("Search", [
  ["circle", { cx: "11", cy: "11", r: "8", key: "4ej97u" }],
  ["path", { d: "m21 21-4.3-4.3", key: "1qie3q" }]
]);
/**
 * @license lucide-react v0.298.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */
const lc = Qe("X", [
  ["path", { d: "M18 6 6 18", key: "1bl5f8" }],
  ["path", { d: "m6 6 12 12", key: "d8bk6v" }]
]);
function ji(e) {
  var t, n, o = "";
  if (typeof e == "string" || typeof e == "number")
    o += e;
  else if (typeof e == "object")
    if (Array.isArray(e)) {
      var r = e.length;
      for (t = 0; t < r; t++)
        e[t] && (n = ji(e[t])) && (o && (o += " "), o += n);
    } else
      for (n in e)
        e[n] && (o && (o += " "), o += n);
  return o;
}
function vb() {
  for (var e, t, n = 0, o = "", r = arguments.length; n < r; n++)
    (e = arguments[n]) && (t = ji(e)) && (o && (o += " "), o += t);
  return o;
}
const dc = "-";
function gb(e) {
  const t = $b(e), {
    conflictingClassGroups: n,
    conflictingClassGroupModifiers: o
  } = e;
  function r(c) {
    const s = c.split(dc);
    return s[0] === "" && s.length !== 1 && s.shift(), Yi(s, t) || hb(c);
  }
  function a(c, s) {
    const i = n[c] || [];
    return s && o[c] ? [...i, ...o[c]] : i;
  }
  return {
    getClassGroupId: r,
    getConflictingClassGroupIds: a
  };
}
function Yi(e, t) {
  var c;
  if (e.length === 0)
    return t.classGroupId;
  const n = e[0], o = t.nextPart.get(n), r = o ? Yi(e.slice(1), o) : void 0;
  if (r)
    return r;
  if (t.validators.length === 0)
    return;
  const a = e.join(dc);
  return (c = t.validators.find(({
    validator: s
  }) => s(a))) == null ? void 0 : c.classGroupId;
}
const $s = /^\[(.+)\]$/;
function hb(e) {
  if ($s.test(e)) {
    const t = $s.exec(e)[1], n = t == null ? void 0 : t.substring(0, t.indexOf(":"));
    if (n)
      return "arbitrary.." + n;
  }
}
function $b(e) {
  const {
    theme: t,
    prefix: n
  } = e, o = {
    nextPart: /* @__PURE__ */ new Map(),
    validators: []
  };
  return wb(Object.entries(e.classGroups), n).forEach(([a, c]) => {
    wa(c, o, a, t);
  }), o;
}
function wa(e, t, n, o) {
  e.forEach((r) => {
    if (typeof r == "string") {
      const a = r === "" ? t : xs(t, r);
      a.classGroupId = n;
      return;
    }
    if (typeof r == "function") {
      if (xb(r)) {
        wa(r(o), t, n, o);
        return;
      }
      t.validators.push({
        validator: r,
        classGroupId: n
      });
      return;
    }
    Object.entries(r).forEach(([a, c]) => {
      wa(c, xs(t, a), n, o);
    });
  });
}
function xs(e, t) {
  let n = e;
  return t.split(dc).forEach((o) => {
    n.nextPart.has(o) || n.nextPart.set(o, {
      nextPart: /* @__PURE__ */ new Map(),
      validators: []
    }), n = n.nextPart.get(o);
  }), n;
}
function xb(e) {
  return e.isThemeGetter;
}
function wb(e, t) {
  return t ? e.map(([n, o]) => {
    const r = o.map((a) => typeof a == "string" ? t + a : typeof a == "object" ? Object.fromEntries(Object.entries(a).map(([c, s]) => [t + c, s])) : a);
    return [n, r];
  }) : e;
}
function yb(e) {
  if (e < 1)
    return {
      get: () => {
      },
      set: () => {
      }
    };
  let t = 0, n = /* @__PURE__ */ new Map(), o = /* @__PURE__ */ new Map();
  function r(a, c) {
    n.set(a, c), t++, t > e && (t = 0, o = n, n = /* @__PURE__ */ new Map());
  }
  return {
    get(a) {
      let c = n.get(a);
      if (c !== void 0)
        return c;
      if ((c = o.get(a)) !== void 0)
        return r(a, c), c;
    },
    set(a, c) {
      n.has(a) ? n.set(a, c) : r(a, c);
    }
  };
}
const Xi = "!";
function Cb(e) {
  const t = e.separator, n = t.length === 1, o = t[0], r = t.length;
  return function(c) {
    const s = [];
    let i = 0, l = 0, u;
    for (let p = 0; p < c.length; p++) {
      let g = c[p];
      if (i === 0) {
        if (g === o && (n || c.slice(p, p + r) === t)) {
          s.push(c.slice(l, p)), l = p + r;
          continue;
        }
        if (g === "/") {
          u = p;
          continue;
        }
      }
      g === "[" ? i++ : g === "]" && i--;
    }
    const d = s.length === 0 ? c : c.substring(l), f = d.startsWith(Xi), m = f ? d.substring(1) : d, b = u && u > l ? u - l : void 0;
    return {
      modifiers: s,
      hasImportantModifier: f,
      baseClassName: m,
      maybePostfixModifierPosition: b
    };
  };
}
function Sb(e) {
  if (e.length <= 1)
    return e;
  const t = [];
  let n = [];
  return e.forEach((o) => {
    o[0] === "[" ? (t.push(...n.sort(), o), n = []) : n.push(o);
  }), t.push(...n.sort()), t;
}
function Eb(e) {
  return {
    cache: yb(e.cacheSize),
    splitModifiers: Cb(e),
    ...gb(e)
  };
}
const Pb = /\s+/;
function _b(e, t) {
  const {
    splitModifiers: n,
    getClassGroupId: o,
    getConflictingClassGroupIds: r
  } = t, a = /* @__PURE__ */ new Set();
  return e.trim().split(Pb).map((c) => {
    const {
      modifiers: s,
      hasImportantModifier: i,
      baseClassName: l,
      maybePostfixModifierPosition: u
    } = n(c);
    let d = o(u ? l.substring(0, u) : l), f = !!u;
    if (!d) {
      if (!u)
        return {
          isTailwindClass: !1,
          originalClassName: c
        };
      if (d = o(l), !d)
        return {
          isTailwindClass: !1,
          originalClassName: c
        };
      f = !1;
    }
    const m = Sb(s).join(":");
    return {
      isTailwindClass: !0,
      modifierId: i ? m + Xi : m,
      classGroupId: d,
      originalClassName: c,
      hasPostfixModifier: f
    };
  }).reverse().filter((c) => {
    if (!c.isTailwindClass)
      return !0;
    const {
      modifierId: s,
      classGroupId: i,
      hasPostfixModifier: l
    } = c, u = s + i;
    return a.has(u) ? !1 : (a.add(u), r(i, l).forEach((d) => a.add(s + d)), !0);
  }).reverse().map((c) => c.originalClassName).join(" ");
}
function Tb() {
  let e = 0, t, n, o = "";
  for (; e < arguments.length; )
    (t = arguments[e++]) && (n = qi(t)) && (o && (o += " "), o += n);
  return o;
}
function qi(e) {
  if (typeof e == "string")
    return e;
  let t, n = "";
  for (let o = 0; o < e.length; o++)
    e[o] && (t = qi(e[o])) && (n && (n += " "), n += t);
  return n;
}
function Nb(e, ...t) {
  let n, o, r, a = c;
  function c(i) {
    const l = t.reduce((u, d) => d(u), e());
    return n = Eb(l), o = n.cache.get, r = n.cache.set, a = s, s(i);
  }
  function s(i) {
    const l = o(i);
    if (l)
      return l;
    const u = _b(i, n);
    return r(i, u), u;
  }
  return function() {
    return a(Tb.apply(null, arguments));
  };
}
function Ce(e) {
  const t = (n) => n[e] || [];
  return t.isThemeGetter = !0, t;
}
const Zi = /^\[(?:([a-z-]+):)?(.+)\]$/i, Rb = /^\d+\/\d+$/, Ab = /* @__PURE__ */ new Set(["px", "full", "screen"]), Mb = /^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/, Db = /\d+(%|px|r?em|[sdl]?v([hwib]|min|max)|pt|pc|in|cm|mm|cap|ch|ex|r?lh|cq(w|h|i|b|min|max))|\b(calc|min|max|clamp)\(.+\)|^0$/, Ib = /^(rgba?|hsla?|hwb|(ok)?(lab|lch))\(.+\)$/, Ob = /^-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/, kb = /^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/;
function mt(e) {
  return Gt(e) || Ab.has(e) || Rb.test(e);
}
function Et(e) {
  return yn(e, "length", Gb);
}
function Gt(e) {
  return !!e && !Number.isNaN(Number(e));
}
function Ao(e) {
  return yn(e, "number", Gt);
}
function Fn(e) {
  return !!e && Number.isInteger(Number(e));
}
function Lb(e) {
  return e.endsWith("%") && Gt(e.slice(0, -1));
}
function be(e) {
  return Zi.test(e);
}
function Pt(e) {
  return Mb.test(e);
}
const Fb = /* @__PURE__ */ new Set(["length", "size", "percentage"]);
function zb(e) {
  return yn(e, Fb, Qi);
}
function Vb(e) {
  return yn(e, "position", Qi);
}
const Hb = /* @__PURE__ */ new Set(["image", "url"]);
function Bb(e) {
  return yn(e, Hb, Wb);
}
function Kb(e) {
  return yn(e, "", Ub);
}
function zn() {
  return !0;
}
function yn(e, t, n) {
  const o = Zi.exec(e);
  return o ? o[1] ? typeof t == "string" ? o[1] === t : t.has(o[1]) : n(o[2]) : !1;
}
function Gb(e) {
  return Db.test(e) && !Ib.test(e);
}
function Qi() {
  return !1;
}
function Ub(e) {
  return Ob.test(e);
}
function Wb(e) {
  return kb.test(e);
}
function jb() {
  const e = Ce("colors"), t = Ce("spacing"), n = Ce("blur"), o = Ce("brightness"), r = Ce("borderColor"), a = Ce("borderRadius"), c = Ce("borderSpacing"), s = Ce("borderWidth"), i = Ce("contrast"), l = Ce("grayscale"), u = Ce("hueRotate"), d = Ce("invert"), f = Ce("gap"), m = Ce("gradientColorStops"), b = Ce("gradientColorStopPositions"), p = Ce("inset"), g = Ce("margin"), h = Ce("opacity"), $ = Ce("padding"), x = Ce("saturate"), C = Ce("scale"), y = Ce("sepia"), E = Ce("skew"), T = Ce("space"), R = Ce("translate"), N = () => ["auto", "contain", "none"], H = () => ["auto", "hidden", "clip", "visible", "scroll"], K = () => ["auto", be, t], I = () => [be, t], Q = () => ["", mt, Et], D = () => ["auto", Gt, be], V = () => ["bottom", "center", "left", "left-bottom", "left-top", "right", "right-bottom", "right-top", "top"], J = () => ["solid", "dashed", "dotted", "double", "none"], oe = () => ["normal", "multiply", "screen", "overlay", "darken", "lighten", "color-dodge", "color-burn", "hard-light", "soft-light", "difference", "exclusion", "hue", "saturation", "color", "luminosity", "plus-lighter"], se = () => ["start", "end", "center", "between", "around", "evenly", "stretch"], Y = () => ["", "0", be], k = () => ["auto", "avoid", "all", "avoid-page", "page", "left", "right", "column"], W = () => [Gt, Ao], L = () => [Gt, be];
  return {
    cacheSize: 500,
    separator: ":",
    theme: {
      colors: [zn],
      spacing: [mt, Et],
      blur: ["none", "", Pt, be],
      brightness: W(),
      borderColor: [e],
      borderRadius: ["none", "", "full", Pt, be],
      borderSpacing: I(),
      borderWidth: Q(),
      contrast: W(),
      grayscale: Y(),
      hueRotate: L(),
      invert: Y(),
      gap: I(),
      gradientColorStops: [e],
      gradientColorStopPositions: [Lb, Et],
      inset: K(),
      margin: K(),
      opacity: W(),
      padding: I(),
      saturate: W(),
      scale: W(),
      sepia: Y(),
      skew: L(),
      space: I(),
      translate: I()
    },
    classGroups: {
      // Layout
      /**
       * Aspect Ratio
       * @see https://tailwindcss.com/docs/aspect-ratio
       */
      aspect: [{
        aspect: ["auto", "square", "video", be]
      }],
      /**
       * Container
       * @see https://tailwindcss.com/docs/container
       */
      container: ["container"],
      /**
       * Columns
       * @see https://tailwindcss.com/docs/columns
       */
      columns: [{
        columns: [Pt]
      }],
      /**
       * Break After
       * @see https://tailwindcss.com/docs/break-after
       */
      "break-after": [{
        "break-after": k()
      }],
      /**
       * Break Before
       * @see https://tailwindcss.com/docs/break-before
       */
      "break-before": [{
        "break-before": k()
      }],
      /**
       * Break Inside
       * @see https://tailwindcss.com/docs/break-inside
       */
      "break-inside": [{
        "break-inside": ["auto", "avoid", "avoid-page", "avoid-column"]
      }],
      /**
       * Box Decoration Break
       * @see https://tailwindcss.com/docs/box-decoration-break
       */
      "box-decoration": [{
        "box-decoration": ["slice", "clone"]
      }],
      /**
       * Box Sizing
       * @see https://tailwindcss.com/docs/box-sizing
       */
      box: [{
        box: ["border", "content"]
      }],
      /**
       * Display
       * @see https://tailwindcss.com/docs/display
       */
      display: ["block", "inline-block", "inline", "flex", "inline-flex", "table", "inline-table", "table-caption", "table-cell", "table-column", "table-column-group", "table-footer-group", "table-header-group", "table-row-group", "table-row", "flow-root", "grid", "inline-grid", "contents", "list-item", "hidden"],
      /**
       * Floats
       * @see https://tailwindcss.com/docs/float
       */
      float: [{
        float: ["right", "left", "none", "start", "end"]
      }],
      /**
       * Clear
       * @see https://tailwindcss.com/docs/clear
       */
      clear: [{
        clear: ["left", "right", "both", "none", "start", "end"]
      }],
      /**
       * Isolation
       * @see https://tailwindcss.com/docs/isolation
       */
      isolation: ["isolate", "isolation-auto"],
      /**
       * Object Fit
       * @see https://tailwindcss.com/docs/object-fit
       */
      "object-fit": [{
        object: ["contain", "cover", "fill", "none", "scale-down"]
      }],
      /**
       * Object Position
       * @see https://tailwindcss.com/docs/object-position
       */
      "object-position": [{
        object: [...V(), be]
      }],
      /**
       * Overflow
       * @see https://tailwindcss.com/docs/overflow
       */
      overflow: [{
        overflow: H()
      }],
      /**
       * Overflow X
       * @see https://tailwindcss.com/docs/overflow
       */
      "overflow-x": [{
        "overflow-x": H()
      }],
      /**
       * Overflow Y
       * @see https://tailwindcss.com/docs/overflow
       */
      "overflow-y": [{
        "overflow-y": H()
      }],
      /**
       * Overscroll Behavior
       * @see https://tailwindcss.com/docs/overscroll-behavior
       */
      overscroll: [{
        overscroll: N()
      }],
      /**
       * Overscroll Behavior X
       * @see https://tailwindcss.com/docs/overscroll-behavior
       */
      "overscroll-x": [{
        "overscroll-x": N()
      }],
      /**
       * Overscroll Behavior Y
       * @see https://tailwindcss.com/docs/overscroll-behavior
       */
      "overscroll-y": [{
        "overscroll-y": N()
      }],
      /**
       * Position
       * @see https://tailwindcss.com/docs/position
       */
      position: ["static", "fixed", "absolute", "relative", "sticky"],
      /**
       * Top / Right / Bottom / Left
       * @see https://tailwindcss.com/docs/top-right-bottom-left
       */
      inset: [{
        inset: [p]
      }],
      /**
       * Right / Left
       * @see https://tailwindcss.com/docs/top-right-bottom-left
       */
      "inset-x": [{
        "inset-x": [p]
      }],
      /**
       * Top / Bottom
       * @see https://tailwindcss.com/docs/top-right-bottom-left
       */
      "inset-y": [{
        "inset-y": [p]
      }],
      /**
       * Start
       * @see https://tailwindcss.com/docs/top-right-bottom-left
       */
      start: [{
        start: [p]
      }],
      /**
       * End
       * @see https://tailwindcss.com/docs/top-right-bottom-left
       */
      end: [{
        end: [p]
      }],
      /**
       * Top
       * @see https://tailwindcss.com/docs/top-right-bottom-left
       */
      top: [{
        top: [p]
      }],
      /**
       * Right
       * @see https://tailwindcss.com/docs/top-right-bottom-left
       */
      right: [{
        right: [p]
      }],
      /**
       * Bottom
       * @see https://tailwindcss.com/docs/top-right-bottom-left
       */
      bottom: [{
        bottom: [p]
      }],
      /**
       * Left
       * @see https://tailwindcss.com/docs/top-right-bottom-left
       */
      left: [{
        left: [p]
      }],
      /**
       * Visibility
       * @see https://tailwindcss.com/docs/visibility
       */
      visibility: ["visible", "invisible", "collapse"],
      /**
       * Z-Index
       * @see https://tailwindcss.com/docs/z-index
       */
      z: [{
        z: ["auto", Fn, be]
      }],
      // Flexbox and Grid
      /**
       * Flex Basis
       * @see https://tailwindcss.com/docs/flex-basis
       */
      basis: [{
        basis: K()
      }],
      /**
       * Flex Direction
       * @see https://tailwindcss.com/docs/flex-direction
       */
      "flex-direction": [{
        flex: ["row", "row-reverse", "col", "col-reverse"]
      }],
      /**
       * Flex Wrap
       * @see https://tailwindcss.com/docs/flex-wrap
       */
      "flex-wrap": [{
        flex: ["wrap", "wrap-reverse", "nowrap"]
      }],
      /**
       * Flex
       * @see https://tailwindcss.com/docs/flex
       */
      flex: [{
        flex: ["1", "auto", "initial", "none", be]
      }],
      /**
       * Flex Grow
       * @see https://tailwindcss.com/docs/flex-grow
       */
      grow: [{
        grow: Y()
      }],
      /**
       * Flex Shrink
       * @see https://tailwindcss.com/docs/flex-shrink
       */
      shrink: [{
        shrink: Y()
      }],
      /**
       * Order
       * @see https://tailwindcss.com/docs/order
       */
      order: [{
        order: ["first", "last", "none", Fn, be]
      }],
      /**
       * Grid Template Columns
       * @see https://tailwindcss.com/docs/grid-template-columns
       */
      "grid-cols": [{
        "grid-cols": [zn]
      }],
      /**
       * Grid Column Start / End
       * @see https://tailwindcss.com/docs/grid-column
       */
      "col-start-end": [{
        col: ["auto", {
          span: ["full", Fn, be]
        }, be]
      }],
      /**
       * Grid Column Start
       * @see https://tailwindcss.com/docs/grid-column
       */
      "col-start": [{
        "col-start": D()
      }],
      /**
       * Grid Column End
       * @see https://tailwindcss.com/docs/grid-column
       */
      "col-end": [{
        "col-end": D()
      }],
      /**
       * Grid Template Rows
       * @see https://tailwindcss.com/docs/grid-template-rows
       */
      "grid-rows": [{
        "grid-rows": [zn]
      }],
      /**
       * Grid Row Start / End
       * @see https://tailwindcss.com/docs/grid-row
       */
      "row-start-end": [{
        row: ["auto", {
          span: [Fn, be]
        }, be]
      }],
      /**
       * Grid Row Start
       * @see https://tailwindcss.com/docs/grid-row
       */
      "row-start": [{
        "row-start": D()
      }],
      /**
       * Grid Row End
       * @see https://tailwindcss.com/docs/grid-row
       */
      "row-end": [{
        "row-end": D()
      }],
      /**
       * Grid Auto Flow
       * @see https://tailwindcss.com/docs/grid-auto-flow
       */
      "grid-flow": [{
        "grid-flow": ["row", "col", "dense", "row-dense", "col-dense"]
      }],
      /**
       * Grid Auto Columns
       * @see https://tailwindcss.com/docs/grid-auto-columns
       */
      "auto-cols": [{
        "auto-cols": ["auto", "min", "max", "fr", be]
      }],
      /**
       * Grid Auto Rows
       * @see https://tailwindcss.com/docs/grid-auto-rows
       */
      "auto-rows": [{
        "auto-rows": ["auto", "min", "max", "fr", be]
      }],
      /**
       * Gap
       * @see https://tailwindcss.com/docs/gap
       */
      gap: [{
        gap: [f]
      }],
      /**
       * Gap X
       * @see https://tailwindcss.com/docs/gap
       */
      "gap-x": [{
        "gap-x": [f]
      }],
      /**
       * Gap Y
       * @see https://tailwindcss.com/docs/gap
       */
      "gap-y": [{
        "gap-y": [f]
      }],
      /**
       * Justify Content
       * @see https://tailwindcss.com/docs/justify-content
       */
      "justify-content": [{
        justify: ["normal", ...se()]
      }],
      /**
       * Justify Items
       * @see https://tailwindcss.com/docs/justify-items
       */
      "justify-items": [{
        "justify-items": ["start", "end", "center", "stretch"]
      }],
      /**
       * Justify Self
       * @see https://tailwindcss.com/docs/justify-self
       */
      "justify-self": [{
        "justify-self": ["auto", "start", "end", "center", "stretch"]
      }],
      /**
       * Align Content
       * @see https://tailwindcss.com/docs/align-content
       */
      "align-content": [{
        content: ["normal", ...se(), "baseline"]
      }],
      /**
       * Align Items
       * @see https://tailwindcss.com/docs/align-items
       */
      "align-items": [{
        items: ["start", "end", "center", "baseline", "stretch"]
      }],
      /**
       * Align Self
       * @see https://tailwindcss.com/docs/align-self
       */
      "align-self": [{
        self: ["auto", "start", "end", "center", "stretch", "baseline"]
      }],
      /**
       * Place Content
       * @see https://tailwindcss.com/docs/place-content
       */
      "place-content": [{
        "place-content": [...se(), "baseline"]
      }],
      /**
       * Place Items
       * @see https://tailwindcss.com/docs/place-items
       */
      "place-items": [{
        "place-items": ["start", "end", "center", "baseline", "stretch"]
      }],
      /**
       * Place Self
       * @see https://tailwindcss.com/docs/place-self
       */
      "place-self": [{
        "place-self": ["auto", "start", "end", "center", "stretch"]
      }],
      // Spacing
      /**
       * Padding
       * @see https://tailwindcss.com/docs/padding
       */
      p: [{
        p: [$]
      }],
      /**
       * Padding X
       * @see https://tailwindcss.com/docs/padding
       */
      px: [{
        px: [$]
      }],
      /**
       * Padding Y
       * @see https://tailwindcss.com/docs/padding
       */
      py: [{
        py: [$]
      }],
      /**
       * Padding Start
       * @see https://tailwindcss.com/docs/padding
       */
      ps: [{
        ps: [$]
      }],
      /**
       * Padding End
       * @see https://tailwindcss.com/docs/padding
       */
      pe: [{
        pe: [$]
      }],
      /**
       * Padding Top
       * @see https://tailwindcss.com/docs/padding
       */
      pt: [{
        pt: [$]
      }],
      /**
       * Padding Right
       * @see https://tailwindcss.com/docs/padding
       */
      pr: [{
        pr: [$]
      }],
      /**
       * Padding Bottom
       * @see https://tailwindcss.com/docs/padding
       */
      pb: [{
        pb: [$]
      }],
      /**
       * Padding Left
       * @see https://tailwindcss.com/docs/padding
       */
      pl: [{
        pl: [$]
      }],
      /**
       * Margin
       * @see https://tailwindcss.com/docs/margin
       */
      m: [{
        m: [g]
      }],
      /**
       * Margin X
       * @see https://tailwindcss.com/docs/margin
       */
      mx: [{
        mx: [g]
      }],
      /**
       * Margin Y
       * @see https://tailwindcss.com/docs/margin
       */
      my: [{
        my: [g]
      }],
      /**
       * Margin Start
       * @see https://tailwindcss.com/docs/margin
       */
      ms: [{
        ms: [g]
      }],
      /**
       * Margin End
       * @see https://tailwindcss.com/docs/margin
       */
      me: [{
        me: [g]
      }],
      /**
       * Margin Top
       * @see https://tailwindcss.com/docs/margin
       */
      mt: [{
        mt: [g]
      }],
      /**
       * Margin Right
       * @see https://tailwindcss.com/docs/margin
       */
      mr: [{
        mr: [g]
      }],
      /**
       * Margin Bottom
       * @see https://tailwindcss.com/docs/margin
       */
      mb: [{
        mb: [g]
      }],
      /**
       * Margin Left
       * @see https://tailwindcss.com/docs/margin
       */
      ml: [{
        ml: [g]
      }],
      /**
       * Space Between X
       * @see https://tailwindcss.com/docs/space
       */
      "space-x": [{
        "space-x": [T]
      }],
      /**
       * Space Between X Reverse
       * @see https://tailwindcss.com/docs/space
       */
      "space-x-reverse": ["space-x-reverse"],
      /**
       * Space Between Y
       * @see https://tailwindcss.com/docs/space
       */
      "space-y": [{
        "space-y": [T]
      }],
      /**
       * Space Between Y Reverse
       * @see https://tailwindcss.com/docs/space
       */
      "space-y-reverse": ["space-y-reverse"],
      // Sizing
      /**
       * Width
       * @see https://tailwindcss.com/docs/width
       */
      w: [{
        w: ["auto", "min", "max", "fit", "svw", "lvw", "dvw", be, t]
      }],
      /**
       * Min-Width
       * @see https://tailwindcss.com/docs/min-width
       */
      "min-w": [{
        "min-w": [be, t, "min", "max", "fit"]
      }],
      /**
       * Max-Width
       * @see https://tailwindcss.com/docs/max-width
       */
      "max-w": [{
        "max-w": [be, t, "none", "full", "min", "max", "fit", "prose", {
          screen: [Pt]
        }, Pt]
      }],
      /**
       * Height
       * @see https://tailwindcss.com/docs/height
       */
      h: [{
        h: [be, t, "auto", "min", "max", "fit", "svh", "lvh", "dvh"]
      }],
      /**
       * Min-Height
       * @see https://tailwindcss.com/docs/min-height
       */
      "min-h": [{
        "min-h": [be, t, "min", "max", "fit", "svh", "lvh", "dvh"]
      }],
      /**
       * Max-Height
       * @see https://tailwindcss.com/docs/max-height
       */
      "max-h": [{
        "max-h": [be, t, "min", "max", "fit", "svh", "lvh", "dvh"]
      }],
      /**
       * Size
       * @see https://tailwindcss.com/docs/size
       */
      size: [{
        size: [be, t, "auto", "min", "max", "fit"]
      }],
      // Typography
      /**
       * Font Size
       * @see https://tailwindcss.com/docs/font-size
       */
      "font-size": [{
        text: ["base", Pt, Et]
      }],
      /**
       * Font Smoothing
       * @see https://tailwindcss.com/docs/font-smoothing
       */
      "font-smoothing": ["antialiased", "subpixel-antialiased"],
      /**
       * Font Style
       * @see https://tailwindcss.com/docs/font-style
       */
      "font-style": ["italic", "not-italic"],
      /**
       * Font Weight
       * @see https://tailwindcss.com/docs/font-weight
       */
      "font-weight": [{
        font: ["thin", "extralight", "light", "normal", "medium", "semibold", "bold", "extrabold", "black", Ao]
      }],
      /**
       * Font Family
       * @see https://tailwindcss.com/docs/font-family
       */
      "font-family": [{
        font: [zn]
      }],
      /**
       * Font Variant Numeric
       * @see https://tailwindcss.com/docs/font-variant-numeric
       */
      "fvn-normal": ["normal-nums"],
      /**
       * Font Variant Numeric
       * @see https://tailwindcss.com/docs/font-variant-numeric
       */
      "fvn-ordinal": ["ordinal"],
      /**
       * Font Variant Numeric
       * @see https://tailwindcss.com/docs/font-variant-numeric
       */
      "fvn-slashed-zero": ["slashed-zero"],
      /**
       * Font Variant Numeric
       * @see https://tailwindcss.com/docs/font-variant-numeric
       */
      "fvn-figure": ["lining-nums", "oldstyle-nums"],
      /**
       * Font Variant Numeric
       * @see https://tailwindcss.com/docs/font-variant-numeric
       */
      "fvn-spacing": ["proportional-nums", "tabular-nums"],
      /**
       * Font Variant Numeric
       * @see https://tailwindcss.com/docs/font-variant-numeric
       */
      "fvn-fraction": ["diagonal-fractions", "stacked-fractons"],
      /**
       * Letter Spacing
       * @see https://tailwindcss.com/docs/letter-spacing
       */
      tracking: [{
        tracking: ["tighter", "tight", "normal", "wide", "wider", "widest", be]
      }],
      /**
       * Line Clamp
       * @see https://tailwindcss.com/docs/line-clamp
       */
      "line-clamp": [{
        "line-clamp": ["none", Gt, Ao]
      }],
      /**
       * Line Height
       * @see https://tailwindcss.com/docs/line-height
       */
      leading: [{
        leading: ["none", "tight", "snug", "normal", "relaxed", "loose", mt, be]
      }],
      /**
       * List Style Image
       * @see https://tailwindcss.com/docs/list-style-image
       */
      "list-image": [{
        "list-image": ["none", be]
      }],
      /**
       * List Style Type
       * @see https://tailwindcss.com/docs/list-style-type
       */
      "list-style-type": [{
        list: ["none", "disc", "decimal", be]
      }],
      /**
       * List Style Position
       * @see https://tailwindcss.com/docs/list-style-position
       */
      "list-style-position": [{
        list: ["inside", "outside"]
      }],
      /**
       * Placeholder Color
       * @deprecated since Tailwind CSS v3.0.0
       * @see https://tailwindcss.com/docs/placeholder-color
       */
      "placeholder-color": [{
        placeholder: [e]
      }],
      /**
       * Placeholder Opacity
       * @see https://tailwindcss.com/docs/placeholder-opacity
       */
      "placeholder-opacity": [{
        "placeholder-opacity": [h]
      }],
      /**
       * Text Alignment
       * @see https://tailwindcss.com/docs/text-align
       */
      "text-alignment": [{
        text: ["left", "center", "right", "justify", "start", "end"]
      }],
      /**
       * Text Color
       * @see https://tailwindcss.com/docs/text-color
       */
      "text-color": [{
        text: [e]
      }],
      /**
       * Text Opacity
       * @see https://tailwindcss.com/docs/text-opacity
       */
      "text-opacity": [{
        "text-opacity": [h]
      }],
      /**
       * Text Decoration
       * @see https://tailwindcss.com/docs/text-decoration
       */
      "text-decoration": ["underline", "overline", "line-through", "no-underline"],
      /**
       * Text Decoration Style
       * @see https://tailwindcss.com/docs/text-decoration-style
       */
      "text-decoration-style": [{
        decoration: [...J(), "wavy"]
      }],
      /**
       * Text Decoration Thickness
       * @see https://tailwindcss.com/docs/text-decoration-thickness
       */
      "text-decoration-thickness": [{
        decoration: ["auto", "from-font", mt, Et]
      }],
      /**
       * Text Underline Offset
       * @see https://tailwindcss.com/docs/text-underline-offset
       */
      "underline-offset": [{
        "underline-offset": ["auto", mt, be]
      }],
      /**
       * Text Decoration Color
       * @see https://tailwindcss.com/docs/text-decoration-color
       */
      "text-decoration-color": [{
        decoration: [e]
      }],
      /**
       * Text Transform
       * @see https://tailwindcss.com/docs/text-transform
       */
      "text-transform": ["uppercase", "lowercase", "capitalize", "normal-case"],
      /**
       * Text Overflow
       * @see https://tailwindcss.com/docs/text-overflow
       */
      "text-overflow": ["truncate", "text-ellipsis", "text-clip"],
      /**
       * Text Wrap
       * @see https://tailwindcss.com/docs/text-wrap
       */
      "text-wrap": [{
        text: ["wrap", "nowrap", "balance", "pretty"]
      }],
      /**
       * Text Indent
       * @see https://tailwindcss.com/docs/text-indent
       */
      indent: [{
        indent: I()
      }],
      /**
       * Vertical Alignment
       * @see https://tailwindcss.com/docs/vertical-align
       */
      "vertical-align": [{
        align: ["baseline", "top", "middle", "bottom", "text-top", "text-bottom", "sub", "super", be]
      }],
      /**
       * Whitespace
       * @see https://tailwindcss.com/docs/whitespace
       */
      whitespace: [{
        whitespace: ["normal", "nowrap", "pre", "pre-line", "pre-wrap", "break-spaces"]
      }],
      /**
       * Word Break
       * @see https://tailwindcss.com/docs/word-break
       */
      break: [{
        break: ["normal", "words", "all", "keep"]
      }],
      /**
       * Hyphens
       * @see https://tailwindcss.com/docs/hyphens
       */
      hyphens: [{
        hyphens: ["none", "manual", "auto"]
      }],
      /**
       * Content
       * @see https://tailwindcss.com/docs/content
       */
      content: [{
        content: ["none", be]
      }],
      // Backgrounds
      /**
       * Background Attachment
       * @see https://tailwindcss.com/docs/background-attachment
       */
      "bg-attachment": [{
        bg: ["fixed", "local", "scroll"]
      }],
      /**
       * Background Clip
       * @see https://tailwindcss.com/docs/background-clip
       */
      "bg-clip": [{
        "bg-clip": ["border", "padding", "content", "text"]
      }],
      /**
       * Background Opacity
       * @deprecated since Tailwind CSS v3.0.0
       * @see https://tailwindcss.com/docs/background-opacity
       */
      "bg-opacity": [{
        "bg-opacity": [h]
      }],
      /**
       * Background Origin
       * @see https://tailwindcss.com/docs/background-origin
       */
      "bg-origin": [{
        "bg-origin": ["border", "padding", "content"]
      }],
      /**
       * Background Position
       * @see https://tailwindcss.com/docs/background-position
       */
      "bg-position": [{
        bg: [...V(), Vb]
      }],
      /**
       * Background Repeat
       * @see https://tailwindcss.com/docs/background-repeat
       */
      "bg-repeat": [{
        bg: ["no-repeat", {
          repeat: ["", "x", "y", "round", "space"]
        }]
      }],
      /**
       * Background Size
       * @see https://tailwindcss.com/docs/background-size
       */
      "bg-size": [{
        bg: ["auto", "cover", "contain", zb]
      }],
      /**
       * Background Image
       * @see https://tailwindcss.com/docs/background-image
       */
      "bg-image": [{
        bg: ["none", {
          "gradient-to": ["t", "tr", "r", "br", "b", "bl", "l", "tl"]
        }, Bb]
      }],
      /**
       * Background Color
       * @see https://tailwindcss.com/docs/background-color
       */
      "bg-color": [{
        bg: [e]
      }],
      /**
       * Gradient Color Stops From Position
       * @see https://tailwindcss.com/docs/gradient-color-stops
       */
      "gradient-from-pos": [{
        from: [b]
      }],
      /**
       * Gradient Color Stops Via Position
       * @see https://tailwindcss.com/docs/gradient-color-stops
       */
      "gradient-via-pos": [{
        via: [b]
      }],
      /**
       * Gradient Color Stops To Position
       * @see https://tailwindcss.com/docs/gradient-color-stops
       */
      "gradient-to-pos": [{
        to: [b]
      }],
      /**
       * Gradient Color Stops From
       * @see https://tailwindcss.com/docs/gradient-color-stops
       */
      "gradient-from": [{
        from: [m]
      }],
      /**
       * Gradient Color Stops Via
       * @see https://tailwindcss.com/docs/gradient-color-stops
       */
      "gradient-via": [{
        via: [m]
      }],
      /**
       * Gradient Color Stops To
       * @see https://tailwindcss.com/docs/gradient-color-stops
       */
      "gradient-to": [{
        to: [m]
      }],
      // Borders
      /**
       * Border Radius
       * @see https://tailwindcss.com/docs/border-radius
       */
      rounded: [{
        rounded: [a]
      }],
      /**
       * Border Radius Start
       * @see https://tailwindcss.com/docs/border-radius
       */
      "rounded-s": [{
        "rounded-s": [a]
      }],
      /**
       * Border Radius End
       * @see https://tailwindcss.com/docs/border-radius
       */
      "rounded-e": [{
        "rounded-e": [a]
      }],
      /**
       * Border Radius Top
       * @see https://tailwindcss.com/docs/border-radius
       */
      "rounded-t": [{
        "rounded-t": [a]
      }],
      /**
       * Border Radius Right
       * @see https://tailwindcss.com/docs/border-radius
       */
      "rounded-r": [{
        "rounded-r": [a]
      }],
      /**
       * Border Radius Bottom
       * @see https://tailwindcss.com/docs/border-radius
       */
      "rounded-b": [{
        "rounded-b": [a]
      }],
      /**
       * Border Radius Left
       * @see https://tailwindcss.com/docs/border-radius
       */
      "rounded-l": [{
        "rounded-l": [a]
      }],
      /**
       * Border Radius Start Start
       * @see https://tailwindcss.com/docs/border-radius
       */
      "rounded-ss": [{
        "rounded-ss": [a]
      }],
      /**
       * Border Radius Start End
       * @see https://tailwindcss.com/docs/border-radius
       */
      "rounded-se": [{
        "rounded-se": [a]
      }],
      /**
       * Border Radius End End
       * @see https://tailwindcss.com/docs/border-radius
       */
      "rounded-ee": [{
        "rounded-ee": [a]
      }],
      /**
       * Border Radius End Start
       * @see https://tailwindcss.com/docs/border-radius
       */
      "rounded-es": [{
        "rounded-es": [a]
      }],
      /**
       * Border Radius Top Left
       * @see https://tailwindcss.com/docs/border-radius
       */
      "rounded-tl": [{
        "rounded-tl": [a]
      }],
      /**
       * Border Radius Top Right
       * @see https://tailwindcss.com/docs/border-radius
       */
      "rounded-tr": [{
        "rounded-tr": [a]
      }],
      /**
       * Border Radius Bottom Right
       * @see https://tailwindcss.com/docs/border-radius
       */
      "rounded-br": [{
        "rounded-br": [a]
      }],
      /**
       * Border Radius Bottom Left
       * @see https://tailwindcss.com/docs/border-radius
       */
      "rounded-bl": [{
        "rounded-bl": [a]
      }],
      /**
       * Border Width
       * @see https://tailwindcss.com/docs/border-width
       */
      "border-w": [{
        border: [s]
      }],
      /**
       * Border Width X
       * @see https://tailwindcss.com/docs/border-width
       */
      "border-w-x": [{
        "border-x": [s]
      }],
      /**
       * Border Width Y
       * @see https://tailwindcss.com/docs/border-width
       */
      "border-w-y": [{
        "border-y": [s]
      }],
      /**
       * Border Width Start
       * @see https://tailwindcss.com/docs/border-width
       */
      "border-w-s": [{
        "border-s": [s]
      }],
      /**
       * Border Width End
       * @see https://tailwindcss.com/docs/border-width
       */
      "border-w-e": [{
        "border-e": [s]
      }],
      /**
       * Border Width Top
       * @see https://tailwindcss.com/docs/border-width
       */
      "border-w-t": [{
        "border-t": [s]
      }],
      /**
       * Border Width Right
       * @see https://tailwindcss.com/docs/border-width
       */
      "border-w-r": [{
        "border-r": [s]
      }],
      /**
       * Border Width Bottom
       * @see https://tailwindcss.com/docs/border-width
       */
      "border-w-b": [{
        "border-b": [s]
      }],
      /**
       * Border Width Left
       * @see https://tailwindcss.com/docs/border-width
       */
      "border-w-l": [{
        "border-l": [s]
      }],
      /**
       * Border Opacity
       * @see https://tailwindcss.com/docs/border-opacity
       */
      "border-opacity": [{
        "border-opacity": [h]
      }],
      /**
       * Border Style
       * @see https://tailwindcss.com/docs/border-style
       */
      "border-style": [{
        border: [...J(), "hidden"]
      }],
      /**
       * Divide Width X
       * @see https://tailwindcss.com/docs/divide-width
       */
      "divide-x": [{
        "divide-x": [s]
      }],
      /**
       * Divide Width X Reverse
       * @see https://tailwindcss.com/docs/divide-width
       */
      "divide-x-reverse": ["divide-x-reverse"],
      /**
       * Divide Width Y
       * @see https://tailwindcss.com/docs/divide-width
       */
      "divide-y": [{
        "divide-y": [s]
      }],
      /**
       * Divide Width Y Reverse
       * @see https://tailwindcss.com/docs/divide-width
       */
      "divide-y-reverse": ["divide-y-reverse"],
      /**
       * Divide Opacity
       * @see https://tailwindcss.com/docs/divide-opacity
       */
      "divide-opacity": [{
        "divide-opacity": [h]
      }],
      /**
       * Divide Style
       * @see https://tailwindcss.com/docs/divide-style
       */
      "divide-style": [{
        divide: J()
      }],
      /**
       * Border Color
       * @see https://tailwindcss.com/docs/border-color
       */
      "border-color": [{
        border: [r]
      }],
      /**
       * Border Color X
       * @see https://tailwindcss.com/docs/border-color
       */
      "border-color-x": [{
        "border-x": [r]
      }],
      /**
       * Border Color Y
       * @see https://tailwindcss.com/docs/border-color
       */
      "border-color-y": [{
        "border-y": [r]
      }],
      /**
       * Border Color Top
       * @see https://tailwindcss.com/docs/border-color
       */
      "border-color-t": [{
        "border-t": [r]
      }],
      /**
       * Border Color Right
       * @see https://tailwindcss.com/docs/border-color
       */
      "border-color-r": [{
        "border-r": [r]
      }],
      /**
       * Border Color Bottom
       * @see https://tailwindcss.com/docs/border-color
       */
      "border-color-b": [{
        "border-b": [r]
      }],
      /**
       * Border Color Left
       * @see https://tailwindcss.com/docs/border-color
       */
      "border-color-l": [{
        "border-l": [r]
      }],
      /**
       * Divide Color
       * @see https://tailwindcss.com/docs/divide-color
       */
      "divide-color": [{
        divide: [r]
      }],
      /**
       * Outline Style
       * @see https://tailwindcss.com/docs/outline-style
       */
      "outline-style": [{
        outline: ["", ...J()]
      }],
      /**
       * Outline Offset
       * @see https://tailwindcss.com/docs/outline-offset
       */
      "outline-offset": [{
        "outline-offset": [mt, be]
      }],
      /**
       * Outline Width
       * @see https://tailwindcss.com/docs/outline-width
       */
      "outline-w": [{
        outline: [mt, Et]
      }],
      /**
       * Outline Color
       * @see https://tailwindcss.com/docs/outline-color
       */
      "outline-color": [{
        outline: [e]
      }],
      /**
       * Ring Width
       * @see https://tailwindcss.com/docs/ring-width
       */
      "ring-w": [{
        ring: Q()
      }],
      /**
       * Ring Width Inset
       * @see https://tailwindcss.com/docs/ring-width
       */
      "ring-w-inset": ["ring-inset"],
      /**
       * Ring Color
       * @see https://tailwindcss.com/docs/ring-color
       */
      "ring-color": [{
        ring: [e]
      }],
      /**
       * Ring Opacity
       * @see https://tailwindcss.com/docs/ring-opacity
       */
      "ring-opacity": [{
        "ring-opacity": [h]
      }],
      /**
       * Ring Offset Width
       * @see https://tailwindcss.com/docs/ring-offset-width
       */
      "ring-offset-w": [{
        "ring-offset": [mt, Et]
      }],
      /**
       * Ring Offset Color
       * @see https://tailwindcss.com/docs/ring-offset-color
       */
      "ring-offset-color": [{
        "ring-offset": [e]
      }],
      // Effects
      /**
       * Box Shadow
       * @see https://tailwindcss.com/docs/box-shadow
       */
      shadow: [{
        shadow: ["", "inner", "none", Pt, Kb]
      }],
      /**
       * Box Shadow Color
       * @see https://tailwindcss.com/docs/box-shadow-color
       */
      "shadow-color": [{
        shadow: [zn]
      }],
      /**
       * Opacity
       * @see https://tailwindcss.com/docs/opacity
       */
      opacity: [{
        opacity: [h]
      }],
      /**
       * Mix Blend Mode
       * @see https://tailwindcss.com/docs/mix-blend-mode
       */
      "mix-blend": [{
        "mix-blend": oe()
      }],
      /**
       * Background Blend Mode
       * @see https://tailwindcss.com/docs/background-blend-mode
       */
      "bg-blend": [{
        "bg-blend": oe()
      }],
      // Filters
      /**
       * Filter
       * @deprecated since Tailwind CSS v3.0.0
       * @see https://tailwindcss.com/docs/filter
       */
      filter: [{
        filter: ["", "none"]
      }],
      /**
       * Blur
       * @see https://tailwindcss.com/docs/blur
       */
      blur: [{
        blur: [n]
      }],
      /**
       * Brightness
       * @see https://tailwindcss.com/docs/brightness
       */
      brightness: [{
        brightness: [o]
      }],
      /**
       * Contrast
       * @see https://tailwindcss.com/docs/contrast
       */
      contrast: [{
        contrast: [i]
      }],
      /**
       * Drop Shadow
       * @see https://tailwindcss.com/docs/drop-shadow
       */
      "drop-shadow": [{
        "drop-shadow": ["", "none", Pt, be]
      }],
      /**
       * Grayscale
       * @see https://tailwindcss.com/docs/grayscale
       */
      grayscale: [{
        grayscale: [l]
      }],
      /**
       * Hue Rotate
       * @see https://tailwindcss.com/docs/hue-rotate
       */
      "hue-rotate": [{
        "hue-rotate": [u]
      }],
      /**
       * Invert
       * @see https://tailwindcss.com/docs/invert
       */
      invert: [{
        invert: [d]
      }],
      /**
       * Saturate
       * @see https://tailwindcss.com/docs/saturate
       */
      saturate: [{
        saturate: [x]
      }],
      /**
       * Sepia
       * @see https://tailwindcss.com/docs/sepia
       */
      sepia: [{
        sepia: [y]
      }],
      /**
       * Backdrop Filter
       * @deprecated since Tailwind CSS v3.0.0
       * @see https://tailwindcss.com/docs/backdrop-filter
       */
      "backdrop-filter": [{
        "backdrop-filter": ["", "none"]
      }],
      /**
       * Backdrop Blur
       * @see https://tailwindcss.com/docs/backdrop-blur
       */
      "backdrop-blur": [{
        "backdrop-blur": [n]
      }],
      /**
       * Backdrop Brightness
       * @see https://tailwindcss.com/docs/backdrop-brightness
       */
      "backdrop-brightness": [{
        "backdrop-brightness": [o]
      }],
      /**
       * Backdrop Contrast
       * @see https://tailwindcss.com/docs/backdrop-contrast
       */
      "backdrop-contrast": [{
        "backdrop-contrast": [i]
      }],
      /**
       * Backdrop Grayscale
       * @see https://tailwindcss.com/docs/backdrop-grayscale
       */
      "backdrop-grayscale": [{
        "backdrop-grayscale": [l]
      }],
      /**
       * Backdrop Hue Rotate
       * @see https://tailwindcss.com/docs/backdrop-hue-rotate
       */
      "backdrop-hue-rotate": [{
        "backdrop-hue-rotate": [u]
      }],
      /**
       * Backdrop Invert
       * @see https://tailwindcss.com/docs/backdrop-invert
       */
      "backdrop-invert": [{
        "backdrop-invert": [d]
      }],
      /**
       * Backdrop Opacity
       * @see https://tailwindcss.com/docs/backdrop-opacity
       */
      "backdrop-opacity": [{
        "backdrop-opacity": [h]
      }],
      /**
       * Backdrop Saturate
       * @see https://tailwindcss.com/docs/backdrop-saturate
       */
      "backdrop-saturate": [{
        "backdrop-saturate": [x]
      }],
      /**
       * Backdrop Sepia
       * @see https://tailwindcss.com/docs/backdrop-sepia
       */
      "backdrop-sepia": [{
        "backdrop-sepia": [y]
      }],
      // Tables
      /**
       * Border Collapse
       * @see https://tailwindcss.com/docs/border-collapse
       */
      "border-collapse": [{
        border: ["collapse", "separate"]
      }],
      /**
       * Border Spacing
       * @see https://tailwindcss.com/docs/border-spacing
       */
      "border-spacing": [{
        "border-spacing": [c]
      }],
      /**
       * Border Spacing X
       * @see https://tailwindcss.com/docs/border-spacing
       */
      "border-spacing-x": [{
        "border-spacing-x": [c]
      }],
      /**
       * Border Spacing Y
       * @see https://tailwindcss.com/docs/border-spacing
       */
      "border-spacing-y": [{
        "border-spacing-y": [c]
      }],
      /**
       * Table Layout
       * @see https://tailwindcss.com/docs/table-layout
       */
      "table-layout": [{
        table: ["auto", "fixed"]
      }],
      /**
       * Caption Side
       * @see https://tailwindcss.com/docs/caption-side
       */
      caption: [{
        caption: ["top", "bottom"]
      }],
      // Transitions and Animation
      /**
       * Tranisition Property
       * @see https://tailwindcss.com/docs/transition-property
       */
      transition: [{
        transition: ["none", "all", "", "colors", "opacity", "shadow", "transform", be]
      }],
      /**
       * Transition Duration
       * @see https://tailwindcss.com/docs/transition-duration
       */
      duration: [{
        duration: L()
      }],
      /**
       * Transition Timing Function
       * @see https://tailwindcss.com/docs/transition-timing-function
       */
      ease: [{
        ease: ["linear", "in", "out", "in-out", be]
      }],
      /**
       * Transition Delay
       * @see https://tailwindcss.com/docs/transition-delay
       */
      delay: [{
        delay: L()
      }],
      /**
       * Animation
       * @see https://tailwindcss.com/docs/animation
       */
      animate: [{
        animate: ["none", "spin", "ping", "pulse", "bounce", be]
      }],
      // Transforms
      /**
       * Transform
       * @see https://tailwindcss.com/docs/transform
       */
      transform: [{
        transform: ["", "gpu", "none"]
      }],
      /**
       * Scale
       * @see https://tailwindcss.com/docs/scale
       */
      scale: [{
        scale: [C]
      }],
      /**
       * Scale X
       * @see https://tailwindcss.com/docs/scale
       */
      "scale-x": [{
        "scale-x": [C]
      }],
      /**
       * Scale Y
       * @see https://tailwindcss.com/docs/scale
       */
      "scale-y": [{
        "scale-y": [C]
      }],
      /**
       * Rotate
       * @see https://tailwindcss.com/docs/rotate
       */
      rotate: [{
        rotate: [Fn, be]
      }],
      /**
       * Translate X
       * @see https://tailwindcss.com/docs/translate
       */
      "translate-x": [{
        "translate-x": [R]
      }],
      /**
       * Translate Y
       * @see https://tailwindcss.com/docs/translate
       */
      "translate-y": [{
        "translate-y": [R]
      }],
      /**
       * Skew X
       * @see https://tailwindcss.com/docs/skew
       */
      "skew-x": [{
        "skew-x": [E]
      }],
      /**
       * Skew Y
       * @see https://tailwindcss.com/docs/skew
       */
      "skew-y": [{
        "skew-y": [E]
      }],
      /**
       * Transform Origin
       * @see https://tailwindcss.com/docs/transform-origin
       */
      "transform-origin": [{
        origin: ["center", "top", "top-right", "right", "bottom-right", "bottom", "bottom-left", "left", "top-left", be]
      }],
      // Interactivity
      /**
       * Accent Color
       * @see https://tailwindcss.com/docs/accent-color
       */
      accent: [{
        accent: ["auto", e]
      }],
      /**
       * Appearance
       * @see https://tailwindcss.com/docs/appearance
       */
      appearance: [{
        appearance: ["none", "auto"]
      }],
      /**
       * Cursor
       * @see https://tailwindcss.com/docs/cursor
       */
      cursor: [{
        cursor: ["auto", "default", "pointer", "wait", "text", "move", "help", "not-allowed", "none", "context-menu", "progress", "cell", "crosshair", "vertical-text", "alias", "copy", "no-drop", "grab", "grabbing", "all-scroll", "col-resize", "row-resize", "n-resize", "e-resize", "s-resize", "w-resize", "ne-resize", "nw-resize", "se-resize", "sw-resize", "ew-resize", "ns-resize", "nesw-resize", "nwse-resize", "zoom-in", "zoom-out", be]
      }],
      /**
       * Caret Color
       * @see https://tailwindcss.com/docs/just-in-time-mode#caret-color-utilities
       */
      "caret-color": [{
        caret: [e]
      }],
      /**
       * Pointer Events
       * @see https://tailwindcss.com/docs/pointer-events
       */
      "pointer-events": [{
        "pointer-events": ["none", "auto"]
      }],
      /**
       * Resize
       * @see https://tailwindcss.com/docs/resize
       */
      resize: [{
        resize: ["none", "y", "x", ""]
      }],
      /**
       * Scroll Behavior
       * @see https://tailwindcss.com/docs/scroll-behavior
       */
      "scroll-behavior": [{
        scroll: ["auto", "smooth"]
      }],
      /**
       * Scroll Margin
       * @see https://tailwindcss.com/docs/scroll-margin
       */
      "scroll-m": [{
        "scroll-m": I()
      }],
      /**
       * Scroll Margin X
       * @see https://tailwindcss.com/docs/scroll-margin
       */
      "scroll-mx": [{
        "scroll-mx": I()
      }],
      /**
       * Scroll Margin Y
       * @see https://tailwindcss.com/docs/scroll-margin
       */
      "scroll-my": [{
        "scroll-my": I()
      }],
      /**
       * Scroll Margin Start
       * @see https://tailwindcss.com/docs/scroll-margin
       */
      "scroll-ms": [{
        "scroll-ms": I()
      }],
      /**
       * Scroll Margin End
       * @see https://tailwindcss.com/docs/scroll-margin
       */
      "scroll-me": [{
        "scroll-me": I()
      }],
      /**
       * Scroll Margin Top
       * @see https://tailwindcss.com/docs/scroll-margin
       */
      "scroll-mt": [{
        "scroll-mt": I()
      }],
      /**
       * Scroll Margin Right
       * @see https://tailwindcss.com/docs/scroll-margin
       */
      "scroll-mr": [{
        "scroll-mr": I()
      }],
      /**
       * Scroll Margin Bottom
       * @see https://tailwindcss.com/docs/scroll-margin
       */
      "scroll-mb": [{
        "scroll-mb": I()
      }],
      /**
       * Scroll Margin Left
       * @see https://tailwindcss.com/docs/scroll-margin
       */
      "scroll-ml": [{
        "scroll-ml": I()
      }],
      /**
       * Scroll Padding
       * @see https://tailwindcss.com/docs/scroll-padding
       */
      "scroll-p": [{
        "scroll-p": I()
      }],
      /**
       * Scroll Padding X
       * @see https://tailwindcss.com/docs/scroll-padding
       */
      "scroll-px": [{
        "scroll-px": I()
      }],
      /**
       * Scroll Padding Y
       * @see https://tailwindcss.com/docs/scroll-padding
       */
      "scroll-py": [{
        "scroll-py": I()
      }],
      /**
       * Scroll Padding Start
       * @see https://tailwindcss.com/docs/scroll-padding
       */
      "scroll-ps": [{
        "scroll-ps": I()
      }],
      /**
       * Scroll Padding End
       * @see https://tailwindcss.com/docs/scroll-padding
       */
      "scroll-pe": [{
        "scroll-pe": I()
      }],
      /**
       * Scroll Padding Top
       * @see https://tailwindcss.com/docs/scroll-padding
       */
      "scroll-pt": [{
        "scroll-pt": I()
      }],
      /**
       * Scroll Padding Right
       * @see https://tailwindcss.com/docs/scroll-padding
       */
      "scroll-pr": [{
        "scroll-pr": I()
      }],
      /**
       * Scroll Padding Bottom
       * @see https://tailwindcss.com/docs/scroll-padding
       */
      "scroll-pb": [{
        "scroll-pb": I()
      }],
      /**
       * Scroll Padding Left
       * @see https://tailwindcss.com/docs/scroll-padding
       */
      "scroll-pl": [{
        "scroll-pl": I()
      }],
      /**
       * Scroll Snap Align
       * @see https://tailwindcss.com/docs/scroll-snap-align
       */
      "snap-align": [{
        snap: ["start", "end", "center", "align-none"]
      }],
      /**
       * Scroll Snap Stop
       * @see https://tailwindcss.com/docs/scroll-snap-stop
       */
      "snap-stop": [{
        snap: ["normal", "always"]
      }],
      /**
       * Scroll Snap Type
       * @see https://tailwindcss.com/docs/scroll-snap-type
       */
      "snap-type": [{
        snap: ["none", "x", "y", "both"]
      }],
      /**
       * Scroll Snap Type Strictness
       * @see https://tailwindcss.com/docs/scroll-snap-type
       */
      "snap-strictness": [{
        snap: ["mandatory", "proximity"]
      }],
      /**
       * Touch Action
       * @see https://tailwindcss.com/docs/touch-action
       */
      touch: [{
        touch: ["auto", "none", "manipulation"]
      }],
      /**
       * Touch Action X
       * @see https://tailwindcss.com/docs/touch-action
       */
      "touch-x": [{
        "touch-pan": ["x", "left", "right"]
      }],
      /**
       * Touch Action Y
       * @see https://tailwindcss.com/docs/touch-action
       */
      "touch-y": [{
        "touch-pan": ["y", "up", "down"]
      }],
      /**
       * Touch Action Pinch Zoom
       * @see https://tailwindcss.com/docs/touch-action
       */
      "touch-pz": ["touch-pinch-zoom"],
      /**
       * User Select
       * @see https://tailwindcss.com/docs/user-select
       */
      select: [{
        select: ["none", "text", "all", "auto"]
      }],
      /**
       * Will Change
       * @see https://tailwindcss.com/docs/will-change
       */
      "will-change": [{
        "will-change": ["auto", "scroll", "contents", "transform", be]
      }],
      // SVG
      /**
       * Fill
       * @see https://tailwindcss.com/docs/fill
       */
      fill: [{
        fill: [e, "none"]
      }],
      /**
       * Stroke Width
       * @see https://tailwindcss.com/docs/stroke-width
       */
      "stroke-w": [{
        stroke: [mt, Et, Ao]
      }],
      /**
       * Stroke
       * @see https://tailwindcss.com/docs/stroke
       */
      stroke: [{
        stroke: [e, "none"]
      }],
      // Accessibility
      /**
       * Screen Readers
       * @see https://tailwindcss.com/docs/screen-readers
       */
      sr: ["sr-only", "not-sr-only"],
      /**
       * Forced Color Adjust
       * @see https://tailwindcss.com/docs/forced-color-adjust
       */
      "forced-color-adjust": [{
        "forced-color-adjust": ["auto", "none"]
      }]
    },
    conflictingClassGroups: {
      overflow: ["overflow-x", "overflow-y"],
      overscroll: ["overscroll-x", "overscroll-y"],
      inset: ["inset-x", "inset-y", "start", "end", "top", "right", "bottom", "left"],
      "inset-x": ["right", "left"],
      "inset-y": ["top", "bottom"],
      flex: ["basis", "grow", "shrink"],
      gap: ["gap-x", "gap-y"],
      p: ["px", "py", "ps", "pe", "pt", "pr", "pb", "pl"],
      px: ["pr", "pl"],
      py: ["pt", "pb"],
      m: ["mx", "my", "ms", "me", "mt", "mr", "mb", "ml"],
      mx: ["mr", "ml"],
      my: ["mt", "mb"],
      size: ["w", "h"],
      "font-size": ["leading"],
      "fvn-normal": ["fvn-ordinal", "fvn-slashed-zero", "fvn-figure", "fvn-spacing", "fvn-fraction"],
      "fvn-ordinal": ["fvn-normal"],
      "fvn-slashed-zero": ["fvn-normal"],
      "fvn-figure": ["fvn-normal"],
      "fvn-spacing": ["fvn-normal"],
      "fvn-fraction": ["fvn-normal"],
      "line-clamp": ["display", "overflow"],
      rounded: ["rounded-s", "rounded-e", "rounded-t", "rounded-r", "rounded-b", "rounded-l", "rounded-ss", "rounded-se", "rounded-ee", "rounded-es", "rounded-tl", "rounded-tr", "rounded-br", "rounded-bl"],
      "rounded-s": ["rounded-ss", "rounded-es"],
      "rounded-e": ["rounded-se", "rounded-ee"],
      "rounded-t": ["rounded-tl", "rounded-tr"],
      "rounded-r": ["rounded-tr", "rounded-br"],
      "rounded-b": ["rounded-br", "rounded-bl"],
      "rounded-l": ["rounded-tl", "rounded-bl"],
      "border-spacing": ["border-spacing-x", "border-spacing-y"],
      "border-w": ["border-w-s", "border-w-e", "border-w-t", "border-w-r", "border-w-b", "border-w-l"],
      "border-w-x": ["border-w-r", "border-w-l"],
      "border-w-y": ["border-w-t", "border-w-b"],
      "border-color": ["border-color-t", "border-color-r", "border-color-b", "border-color-l"],
      "border-color-x": ["border-color-r", "border-color-l"],
      "border-color-y": ["border-color-t", "border-color-b"],
      "scroll-m": ["scroll-mx", "scroll-my", "scroll-ms", "scroll-me", "scroll-mt", "scroll-mr", "scroll-mb", "scroll-ml"],
      "scroll-mx": ["scroll-mr", "scroll-ml"],
      "scroll-my": ["scroll-mt", "scroll-mb"],
      "scroll-p": ["scroll-px", "scroll-py", "scroll-ps", "scroll-pe", "scroll-pt", "scroll-pr", "scroll-pb", "scroll-pl"],
      "scroll-px": ["scroll-pr", "scroll-pl"],
      "scroll-py": ["scroll-pt", "scroll-pb"],
      touch: ["touch-x", "touch-y", "touch-pz"],
      "touch-x": ["touch"],
      "touch-y": ["touch"],
      "touch-pz": ["touch"]
    },
    conflictingClassGroupModifiers: {
      "font-size": ["leading"]
    }
  };
}
const Yb = /* @__PURE__ */ Nb(jb);
function M(...e) {
  return Yb(vb(e));
}
const A7 = rb, Xb = w.forwardRef(({ className: e, ...t }, n) => /* @__PURE__ */ P(ab, { ref: n, className: M("border-b", e), ...t }));
Xb.displayName = "AccordionItem";
const qb = w.forwardRef(({ className: e, children: t, ...n }, o) => /* @__PURE__ */ P(cb, { className: "flex", children: /* @__PURE__ */ ve(
  Ui,
  {
    ref: o,
    className: M(
      "flex flex-1 items-center justify-between py-4 font-medium transition-all hover:underline [&[data-state=open]>svg]:rotate-180",
      e
    ),
    ...n,
    children: [
      t,
      /* @__PURE__ */ P(mr, { className: "h-4 w-4 shrink-0 transition-transform duration-200" })
    ]
  }
) }));
qb.displayName = Ui.displayName;
const Zb = w.forwardRef(({ className: e, children: t, ...n }, o) => /* @__PURE__ */ P(
  Wi,
  {
    ref: o,
    className: "overflow-hidden text-sm transition-all data-[state=closed]:animate-accordion-up data-[state=open]:animate-accordion-down",
    ...n,
    children: /* @__PURE__ */ P("div", { className: M("pb-4 pt-0", e), children: t })
  }
));
Zb.displayName = Wi.displayName;
function Qb(e, t = globalThis == null ? void 0 : globalThis.document) {
  const n = ge(e);
  j(() => {
    const o = (r) => {
      r.key === "Escape" && n(r);
    };
    return t.addEventListener("keydown", o), () => t.removeEventListener("keydown", o);
  }, [
    n,
    t
  ]);
}
const ya = "dismissableLayer.update", Jb = "dismissableLayer.pointerDownOutside", ev = "dismissableLayer.focusOutside";
let ws;
const Ji = /* @__PURE__ */ Nt({
  layers: /* @__PURE__ */ new Set(),
  layersWithOutsidePointerEventsDisabled: /* @__PURE__ */ new Set(),
  branches: /* @__PURE__ */ new Set()
}), Ot = /* @__PURE__ */ _((e, t) => {
  var n;
  const { disableOutsidePointerEvents: o = !1, onEscapeKeyDown: r, onPointerDownOutside: a, onFocusOutside: c, onInteractOutside: s, onDismiss: i, ...l } = e, u = Qt(Ji), [d, f] = q(null), m = (n = d == null ? void 0 : d.ownerDocument) !== null && n !== void 0 ? n : globalThis == null ? void 0 : globalThis.document, [, b] = q({}), p = ae(
    t,
    (R) => f(R)
  ), g = Array.from(u.layers), [h] = [
    ...u.layersWithOutsidePointerEventsDisabled
  ].slice(-1), $ = g.indexOf(h), x = d ? g.indexOf(d) : -1, C = u.layersWithOutsidePointerEventsDisabled.size > 0, y = x >= $, E = nv((R) => {
    const N = R.target, H = [
      ...u.branches
    ].some(
      (K) => K.contains(N)
    );
    !y || H || (a == null || a(R), s == null || s(R), R.defaultPrevented || i == null || i());
  }, m), T = ov((R) => {
    const N = R.target;
    [
      ...u.branches
    ].some(
      (K) => K.contains(N)
    ) || (c == null || c(R), s == null || s(R), R.defaultPrevented || i == null || i());
  }, m);
  return Qb((R) => {
    x === u.layers.size - 1 && (r == null || r(R), !R.defaultPrevented && i && (R.preventDefault(), i()));
  }, m), j(() => {
    if (d)
      return o && (u.layersWithOutsidePointerEventsDisabled.size === 0 && (ws = m.body.style.pointerEvents, m.body.style.pointerEvents = "none"), u.layersWithOutsidePointerEventsDisabled.add(d)), u.layers.add(d), ys(), () => {
        o && u.layersWithOutsidePointerEventsDisabled.size === 1 && (m.body.style.pointerEvents = ws);
      };
  }, [
    d,
    m,
    o,
    u
  ]), j(() => () => {
    d && (u.layers.delete(d), u.layersWithOutsidePointerEventsDisabled.delete(d), ys());
  }, [
    d,
    u
  ]), j(() => {
    const R = () => b({});
    return document.addEventListener(ya, R), () => document.removeEventListener(ya, R);
  }, []), /* @__PURE__ */ v(Z.div, S({}, l, {
    ref: p,
    style: {
      pointerEvents: C ? y ? "auto" : "none" : void 0,
      ...e.style
    },
    onFocusCapture: O(e.onFocusCapture, T.onFocusCapture),
    onBlurCapture: O(e.onBlurCapture, T.onBlurCapture),
    onPointerDownCapture: O(e.onPointerDownCapture, E.onPointerDownCapture)
  }));
}), tv = /* @__PURE__ */ _((e, t) => {
  const n = Qt(Ji), o = A(null), r = ae(t, o);
  return j(() => {
    const a = o.current;
    if (a)
      return n.branches.add(a), () => {
        n.branches.delete(a);
      };
  }, [
    n.branches
  ]), /* @__PURE__ */ v(Z.div, S({}, e, {
    ref: r
  }));
});
function nv(e, t = globalThis == null ? void 0 : globalThis.document) {
  const n = ge(e), o = A(!1), r = A(() => {
  });
  return j(() => {
    const a = (s) => {
      if (s.target && !o.current) {
        let l = function() {
          el(Jb, n, i, {
            discrete: !0
          });
        };
        const i = {
          originalEvent: s
        };
        s.pointerType === "touch" ? (t.removeEventListener("click", r.current), r.current = l, t.addEventListener("click", r.current, {
          once: !0
        })) : l();
      } else
        t.removeEventListener("click", r.current);
      o.current = !1;
    }, c = window.setTimeout(() => {
      t.addEventListener("pointerdown", a);
    }, 0);
    return () => {
      window.clearTimeout(c), t.removeEventListener("pointerdown", a), t.removeEventListener("click", r.current);
    };
  }, [
    t,
    n
  ]), {
    // ensures we check React component tree (not just DOM tree)
    onPointerDownCapture: () => o.current = !0
  };
}
function ov(e, t = globalThis == null ? void 0 : globalThis.document) {
  const n = ge(e), o = A(!1);
  return j(() => {
    const r = (a) => {
      a.target && !o.current && el(ev, n, {
        originalEvent: a
      }, {
        discrete: !1
      });
    };
    return t.addEventListener("focusin", r), () => t.removeEventListener("focusin", r);
  }, [
    t,
    n
  ]), {
    onFocusCapture: () => o.current = !0,
    onBlurCapture: () => o.current = !1
  };
}
function ys() {
  const e = new CustomEvent(ya);
  document.dispatchEvent(e);
}
function el(e, t, n, { discrete: o }) {
  const r = n.originalEvent.target, a = new CustomEvent(e, {
    bubbles: !1,
    cancelable: !0,
    detail: n
  });
  t && r.addEventListener(e, t, {
    once: !0
  }), o ? Xn(r, a) : r.dispatchEvent(a);
}
const rv = Ot, av = tv, qr = "focusScope.autoFocusOnMount", Zr = "focusScope.autoFocusOnUnmount", Cs = {
  bubbles: !1,
  cancelable: !0
}, gr = /* @__PURE__ */ _((e, t) => {
  const { loop: n = !1, trapped: o = !1, onMountAutoFocus: r, onUnmountAutoFocus: a, ...c } = e, [s, i] = q(null), l = ge(r), u = ge(a), d = A(null), f = ae(
    t,
    (p) => i(p)
  ), m = A({
    paused: !1,
    pause() {
      this.paused = !0;
    },
    resume() {
      this.paused = !1;
    }
  }).current;
  j(() => {
    if (o) {
      let p = function(x) {
        if (m.paused || !s)
          return;
        const C = x.target;
        s.contains(C) ? d.current = C : Tt(d.current, {
          select: !0
        });
      }, g = function(x) {
        if (m.paused || !s)
          return;
        const C = x.relatedTarget;
        C !== null && (s.contains(C) || Tt(d.current, {
          select: !0
        }));
      }, h = function(x) {
        if (document.activeElement === document.body)
          for (const y of x)
            y.removedNodes.length > 0 && Tt(s);
      };
      document.addEventListener("focusin", p), document.addEventListener("focusout", g);
      const $ = new MutationObserver(h);
      return s && $.observe(s, {
        childList: !0,
        subtree: !0
      }), () => {
        document.removeEventListener("focusin", p), document.removeEventListener("focusout", g), $.disconnect();
      };
    }
  }, [
    o,
    s,
    m.paused
  ]), j(() => {
    if (s) {
      Es.add(m);
      const p = document.activeElement;
      if (!s.contains(p)) {
        const h = new CustomEvent(qr, Cs);
        s.addEventListener(qr, l), s.dispatchEvent(h), h.defaultPrevented || (cv(uv(tl(s)), {
          select: !0
        }), document.activeElement === p && Tt(s));
      }
      return () => {
        s.removeEventListener(qr, l), setTimeout(() => {
          const h = new CustomEvent(Zr, Cs);
          s.addEventListener(Zr, u), s.dispatchEvent(h), h.defaultPrevented || Tt(p ?? document.body, {
            select: !0
          }), s.removeEventListener(Zr, u), Es.remove(m);
        }, 0);
      };
    }
  }, [
    s,
    l,
    u,
    m
  ]);
  const b = re((p) => {
    if (!n && !o || m.paused)
      return;
    const g = p.key === "Tab" && !p.altKey && !p.ctrlKey && !p.metaKey, h = document.activeElement;
    if (g && h) {
      const $ = p.currentTarget, [x, C] = sv($);
      x && C ? !p.shiftKey && h === C ? (p.preventDefault(), n && Tt(x, {
        select: !0
      })) : p.shiftKey && h === x && (p.preventDefault(), n && Tt(C, {
        select: !0
      })) : h === $ && p.preventDefault();
    }
  }, [
    n,
    o,
    m.paused
  ]);
  return /* @__PURE__ */ v(Z.div, S({
    tabIndex: -1
  }, c, {
    ref: f,
    onKeyDown: b
  }));
});
function cv(e, { select: t = !1 } = {}) {
  const n = document.activeElement;
  for (const o of e)
    if (Tt(o, {
      select: t
    }), document.activeElement !== n)
      return;
}
function sv(e) {
  const t = tl(e), n = Ss(t, e), o = Ss(t.reverse(), e);
  return [
    n,
    o
  ];
}
function tl(e) {
  const t = [], n = document.createTreeWalker(e, NodeFilter.SHOW_ELEMENT, {
    acceptNode: (o) => {
      const r = o.tagName === "INPUT" && o.type === "hidden";
      return o.disabled || o.hidden || r ? NodeFilter.FILTER_SKIP : o.tabIndex >= 0 ? NodeFilter.FILTER_ACCEPT : NodeFilter.FILTER_SKIP;
    }
  });
  for (; n.nextNode(); )
    t.push(n.currentNode);
  return t;
}
function Ss(e, t) {
  for (const n of e)
    if (!iv(n, {
      upTo: t
    }))
      return n;
}
function iv(e, { upTo: t }) {
  if (getComputedStyle(e).visibility === "hidden")
    return !0;
  for (; e; ) {
    if (t !== void 0 && e === t)
      return !1;
    if (getComputedStyle(e).display === "none")
      return !0;
    e = e.parentElement;
  }
  return !1;
}
function lv(e) {
  return e instanceof HTMLInputElement && "select" in e;
}
function Tt(e, { select: t = !1 } = {}) {
  if (e && e.focus) {
    const n = document.activeElement;
    e.focus({
      preventScroll: !0
    }), e !== n && lv(e) && t && e.select();
  }
}
const Es = dv();
function dv() {
  let e = [];
  return {
    add(t) {
      const n = e[0];
      t !== n && (n == null || n.pause()), e = Ps(e, t), e.unshift(t);
    },
    remove(t) {
      var n;
      e = Ps(e, t), (n = e[0]) === null || n === void 0 || n.resume();
    }
  };
}
function Ps(e, t) {
  const n = [
    ...e
  ], o = n.indexOf(t);
  return o !== -1 && n.splice(o, 1), n;
}
function uv(e) {
  return e.filter(
    (t) => t.tagName !== "A"
  );
}
const mo = /* @__PURE__ */ _((e, t) => {
  var n;
  const { container: o = globalThis == null || (n = globalThis.document) === null || n === void 0 ? void 0 : n.body, ...r } = e;
  return o ? /* @__PURE__ */ tc.createPortal(/* @__PURE__ */ v(Z.div, S({}, r, {
    ref: t
  })), o) : null;
});
let Qr = 0;
function hr() {
  j(() => {
    var e, t;
    const n = document.querySelectorAll("[data-radix-focus-guard]");
    return document.body.insertAdjacentElement("afterbegin", (e = n[0]) !== null && e !== void 0 ? e : _s()), document.body.insertAdjacentElement("beforeend", (t = n[1]) !== null && t !== void 0 ? t : _s()), Qr++, () => {
      Qr === 1 && document.querySelectorAll("[data-radix-focus-guard]").forEach(
        (o) => o.remove()
      ), Qr--;
    };
  }, []);
}
function _s() {
  const e = document.createElement("span");
  return e.setAttribute("data-radix-focus-guard", ""), e.tabIndex = 0, e.style.cssText = "outline: none; opacity: 0; position: fixed; pointer-events: none", e;
}
var Le = function() {
  return Le = Object.assign || function(t) {
    for (var n, o = 1, r = arguments.length; o < r; o++) {
      n = arguments[o];
      for (var a in n)
        Object.prototype.hasOwnProperty.call(n, a) && (t[a] = n[a]);
    }
    return t;
  }, Le.apply(this, arguments);
};
function uc(e, t) {
  var n = {};
  for (var o in e)
    Object.prototype.hasOwnProperty.call(e, o) && t.indexOf(o) < 0 && (n[o] = e[o]);
  if (e != null && typeof Object.getOwnPropertySymbols == "function")
    for (var r = 0, o = Object.getOwnPropertySymbols(e); r < o.length; r++)
      t.indexOf(o[r]) < 0 && Object.prototype.propertyIsEnumerable.call(e, o[r]) && (n[o[r]] = e[o[r]]);
  return n;
}
function nl(e, t, n) {
  if (n || arguments.length === 2)
    for (var o = 0, r = t.length, a; o < r; o++)
      (a || !(o in t)) && (a || (a = Array.prototype.slice.call(t, 0, o)), a[o] = t[o]);
  return e.concat(a || Array.prototype.slice.call(t));
}
var Un = "right-scroll-bar-position", Wn = "width-before-scroll-bar", fv = "with-scroll-bars-hidden", pv = "--removed-body-scroll-bar-size";
function Jr(e, t) {
  return typeof e == "function" ? e(t) : e && (e.current = t), e;
}
function mv(e, t) {
  var n = q(function() {
    return {
      // value
      value: e,
      // last callback
      callback: t,
      // "memoized" public interface
      facade: {
        get current() {
          return n.value;
        },
        set current(o) {
          var r = n.value;
          r !== o && (n.value = o, n.callback(o, r));
        }
      }
    };
  })[0];
  return n.callback = t, n.facade;
}
var Ts = /* @__PURE__ */ new WeakMap();
function ol(e, t) {
  var n = mv(t || null, function(o) {
    return e.forEach(function(r) {
      return Jr(r, o);
    });
  });
  return w.useLayoutEffect(function() {
    var o = Ts.get(n);
    if (o) {
      var r = new Set(o), a = new Set(e), c = n.current;
      r.forEach(function(s) {
        a.has(s) || Jr(s, null);
      }), a.forEach(function(s) {
        r.has(s) || Jr(s, c);
      });
    }
    Ts.set(n, e);
  }, [e]), n;
}
function bv(e) {
  return e;
}
function vv(e, t) {
  t === void 0 && (t = bv);
  var n = [], o = !1, r = {
    read: function() {
      if (o)
        throw new Error("Sidecar: could not `read` from an `assigned` medium. `read` could be used only with `useMedium`.");
      return n.length ? n[n.length - 1] : e;
    },
    useMedium: function(a) {
      var c = t(a, o);
      return n.push(c), function() {
        n = n.filter(function(s) {
          return s !== c;
        });
      };
    },
    assignSyncMedium: function(a) {
      for (o = !0; n.length; ) {
        var c = n;
        n = [], c.forEach(a);
      }
      n = {
        push: function(s) {
          return a(s);
        },
        filter: function() {
          return n;
        }
      };
    },
    assignMedium: function(a) {
      o = !0;
      var c = [];
      if (n.length) {
        var s = n;
        n = [], s.forEach(a), c = n;
      }
      var i = function() {
        var u = c;
        c = [], u.forEach(a);
      }, l = function() {
        return Promise.resolve().then(i);
      };
      l(), n = {
        push: function(u) {
          c.push(u), l();
        },
        filter: function(u) {
          return c = c.filter(u), n;
        }
      };
    }
  };
  return r;
}
function rl(e) {
  e === void 0 && (e = {});
  var t = vv(null);
  return t.options = Le({ async: !0, ssr: !1 }, e), t;
}
var al = function(e) {
  var t = e.sideCar, n = uc(e, ["sideCar"]);
  if (!t)
    throw new Error("Sidecar: please provide `sideCar` property to import the right car");
  var o = t.read();
  if (!o)
    throw new Error("Sidecar medium not found");
  return w.createElement(o, Le({}, n));
};
al.isSideCarExport = !0;
function cl(e, t) {
  return e.useMedium(t), al;
}
var sl = rl(), ea = function() {
}, $r = w.forwardRef(function(e, t) {
  var n = w.useRef(null), o = w.useState({
    onScrollCapture: ea,
    onWheelCapture: ea,
    onTouchMoveCapture: ea
  }), r = o[0], a = o[1], c = e.forwardProps, s = e.children, i = e.className, l = e.removeScrollBar, u = e.enabled, d = e.shards, f = e.sideCar, m = e.noIsolation, b = e.inert, p = e.allowPinchZoom, g = e.as, h = g === void 0 ? "div" : g, $ = uc(e, ["forwardProps", "children", "className", "removeScrollBar", "enabled", "shards", "sideCar", "noIsolation", "inert", "allowPinchZoom", "as"]), x = f, C = ol([n, t]), y = Le(Le({}, $), r);
  return w.createElement(
    w.Fragment,
    null,
    u && w.createElement(x, { sideCar: sl, removeScrollBar: l, shards: d, noIsolation: m, inert: b, setCallbacks: a, allowPinchZoom: !!p, lockRef: n }),
    c ? w.cloneElement(w.Children.only(s), Le(Le({}, y), { ref: C })) : w.createElement(h, Le({}, y, { className: i, ref: C }), s)
  );
});
$r.defaultProps = {
  enabled: !0,
  removeScrollBar: !0,
  inert: !1
};
$r.classNames = {
  fullWidth: Wn,
  zeroRight: Un
};
var gv = function() {
  if (typeof __webpack_nonce__ < "u")
    return __webpack_nonce__;
};
function hv() {
  if (!document)
    return null;
  var e = document.createElement("style");
  e.type = "text/css";
  var t = gv();
  return t && e.setAttribute("nonce", t), e;
}
function $v(e, t) {
  e.styleSheet ? e.styleSheet.cssText = t : e.appendChild(document.createTextNode(t));
}
function xv(e) {
  var t = document.head || document.getElementsByTagName("head")[0];
  t.appendChild(e);
}
var wv = function() {
  var e = 0, t = null;
  return {
    add: function(n) {
      e == 0 && (t = hv()) && ($v(t, n), xv(t)), e++;
    },
    remove: function() {
      e--, !e && t && (t.parentNode && t.parentNode.removeChild(t), t = null);
    }
  };
}, yv = function() {
  var e = wv();
  return function(t, n) {
    w.useEffect(function() {
      return e.add(t), function() {
        e.remove();
      };
    }, [t && n]);
  };
}, fc = function() {
  var e = yv(), t = function(n) {
    var o = n.styles, r = n.dynamic;
    return e(o, r), null;
  };
  return t;
}, Cv = {
  left: 0,
  top: 0,
  right: 0,
  gap: 0
}, ta = function(e) {
  return parseInt(e || "", 10) || 0;
}, Sv = function(e) {
  var t = window.getComputedStyle(document.body), n = t[e === "padding" ? "paddingLeft" : "marginLeft"], o = t[e === "padding" ? "paddingTop" : "marginTop"], r = t[e === "padding" ? "paddingRight" : "marginRight"];
  return [ta(n), ta(o), ta(r)];
}, Ev = function(e) {
  if (e === void 0 && (e = "margin"), typeof window > "u")
    return Cv;
  var t = Sv(e), n = document.documentElement.clientWidth, o = window.innerWidth;
  return {
    left: t[0],
    top: t[1],
    right: t[2],
    gap: Math.max(0, o - n + t[2] - t[0])
  };
}, Pv = fc(), _v = function(e, t, n, o) {
  var r = e.left, a = e.top, c = e.right, s = e.gap;
  return n === void 0 && (n = "margin"), `
  .`.concat(fv, ` {
   overflow: hidden `).concat(o, `;
   padding-right: `).concat(s, "px ").concat(o, `;
  }
  body {
    overflow: hidden `).concat(o, `;
    overscroll-behavior: contain;
    `).concat([
    t && "position: relative ".concat(o, ";"),
    n === "margin" && `
    padding-left: `.concat(r, `px;
    padding-top: `).concat(a, `px;
    padding-right: `).concat(c, `px;
    margin-left:0;
    margin-top:0;
    margin-right: `).concat(s, "px ").concat(o, `;
    `),
    n === "padding" && "padding-right: ".concat(s, "px ").concat(o, ";")
  ].filter(Boolean).join(""), `
  }
  
  .`).concat(Un, ` {
    right: `).concat(s, "px ").concat(o, `;
  }
  
  .`).concat(Wn, ` {
    margin-right: `).concat(s, "px ").concat(o, `;
  }
  
  .`).concat(Un, " .").concat(Un, ` {
    right: 0 `).concat(o, `;
  }
  
  .`).concat(Wn, " .").concat(Wn, ` {
    margin-right: 0 `).concat(o, `;
  }
  
  body {
    `).concat(pv, ": ").concat(s, `px;
  }
`);
}, il = function(e) {
  var t = e.noRelative, n = e.noImportant, o = e.gapMode, r = o === void 0 ? "margin" : o, a = w.useMemo(function() {
    return Ev(r);
  }, [r]);
  return w.createElement(Pv, { styles: _v(a, !t, r, n ? "" : "!important") });
}, Ca = !1;
if (typeof window < "u")
  try {
    var Mo = Object.defineProperty({}, "passive", {
      get: function() {
        return Ca = !0, !0;
      }
    });
    window.addEventListener("test", Mo, Mo), window.removeEventListener("test", Mo, Mo);
  } catch {
    Ca = !1;
  }
var rn = Ca ? { passive: !1 } : !1, Tv = function(e) {
  return e.tagName === "TEXTAREA";
}, ll = function(e, t) {
  var n = window.getComputedStyle(e);
  return (
    // not-not-scrollable
    n[t] !== "hidden" && // contains scroll inside self
    !(n.overflowY === n.overflowX && !Tv(e) && n[t] === "visible")
  );
}, Nv = function(e) {
  return ll(e, "overflowY");
}, Rv = function(e) {
  return ll(e, "overflowX");
}, Ns = function(e, t) {
  var n = t;
  do {
    typeof ShadowRoot < "u" && n instanceof ShadowRoot && (n = n.host);
    var o = dl(e, n);
    if (o) {
      var r = ul(e, n), a = r[1], c = r[2];
      if (a > c)
        return !0;
    }
    n = n.parentNode;
  } while (n && n !== document.body);
  return !1;
}, Av = function(e) {
  var t = e.scrollTop, n = e.scrollHeight, o = e.clientHeight;
  return [
    t,
    n,
    o
  ];
}, Mv = function(e) {
  var t = e.scrollLeft, n = e.scrollWidth, o = e.clientWidth;
  return [
    t,
    n,
    o
  ];
}, dl = function(e, t) {
  return e === "v" ? Nv(t) : Rv(t);
}, ul = function(e, t) {
  return e === "v" ? Av(t) : Mv(t);
}, Dv = function(e, t) {
  return e === "h" && t === "rtl" ? -1 : 1;
}, Iv = function(e, t, n, o, r) {
  var a = Dv(e, window.getComputedStyle(t).direction), c = a * o, s = n.target, i = t.contains(s), l = !1, u = c > 0, d = 0, f = 0;
  do {
    var m = ul(e, s), b = m[0], p = m[1], g = m[2], h = p - g - a * b;
    (b || h) && dl(e, s) && (d += h, f += b), s = s.parentNode;
  } while (
    // portaled content
    !i && s !== document.body || // self content
    i && (t.contains(s) || t === s)
  );
  return (u && (r && d === 0 || !r && c > d) || !u && (r && f === 0 || !r && -c > f)) && (l = !0), l;
}, Do = function(e) {
  return "changedTouches" in e ? [e.changedTouches[0].clientX, e.changedTouches[0].clientY] : [0, 0];
}, Rs = function(e) {
  return [e.deltaX, e.deltaY];
}, As = function(e) {
  return e && "current" in e ? e.current : e;
}, Ov = function(e, t) {
  return e[0] === t[0] && e[1] === t[1];
}, kv = function(e) {
  return `
  .block-interactivity-`.concat(e, ` {pointer-events: none;}
  .allow-interactivity-`).concat(e, ` {pointer-events: all;}
`);
}, Lv = 0, an = [];
function Fv(e) {
  var t = w.useRef([]), n = w.useRef([0, 0]), o = w.useRef(), r = w.useState(Lv++)[0], a = w.useState(function() {
    return fc();
  })[0], c = w.useRef(e);
  w.useEffect(function() {
    c.current = e;
  }, [e]), w.useEffect(function() {
    if (e.inert) {
      document.body.classList.add("block-interactivity-".concat(r));
      var p = nl([e.lockRef.current], (e.shards || []).map(As), !0).filter(Boolean);
      return p.forEach(function(g) {
        return g.classList.add("allow-interactivity-".concat(r));
      }), function() {
        document.body.classList.remove("block-interactivity-".concat(r)), p.forEach(function(g) {
          return g.classList.remove("allow-interactivity-".concat(r));
        });
      };
    }
  }, [e.inert, e.lockRef.current, e.shards]);
  var s = w.useCallback(function(p, g) {
    if ("touches" in p && p.touches.length === 2)
      return !c.current.allowPinchZoom;
    var h = Do(p), $ = n.current, x = "deltaX" in p ? p.deltaX : $[0] - h[0], C = "deltaY" in p ? p.deltaY : $[1] - h[1], y, E = p.target, T = Math.abs(x) > Math.abs(C) ? "h" : "v";
    if ("touches" in p && T === "h" && E.type === "range")
      return !1;
    var R = Ns(T, E);
    if (!R)
      return !0;
    if (R ? y = T : (y = T === "v" ? "h" : "v", R = Ns(T, E)), !R)
      return !1;
    if (!o.current && "changedTouches" in p && (x || C) && (o.current = y), !y)
      return !0;
    var N = o.current || y;
    return Iv(N, g, p, N === "h" ? x : C, !0);
  }, []), i = w.useCallback(function(p) {
    var g = p;
    if (!(!an.length || an[an.length - 1] !== a)) {
      var h = "deltaY" in g ? Rs(g) : Do(g), $ = t.current.filter(function(y) {
        return y.name === g.type && y.target === g.target && Ov(y.delta, h);
      })[0];
      if ($ && $.should) {
        g.cancelable && g.preventDefault();
        return;
      }
      if (!$) {
        var x = (c.current.shards || []).map(As).filter(Boolean).filter(function(y) {
          return y.contains(g.target);
        }), C = x.length > 0 ? s(g, x[0]) : !c.current.noIsolation;
        C && g.cancelable && g.preventDefault();
      }
    }
  }, []), l = w.useCallback(function(p, g, h, $) {
    var x = { name: p, delta: g, target: h, should: $ };
    t.current.push(x), setTimeout(function() {
      t.current = t.current.filter(function(C) {
        return C !== x;
      });
    }, 1);
  }, []), u = w.useCallback(function(p) {
    n.current = Do(p), o.current = void 0;
  }, []), d = w.useCallback(function(p) {
    l(p.type, Rs(p), p.target, s(p, e.lockRef.current));
  }, []), f = w.useCallback(function(p) {
    l(p.type, Do(p), p.target, s(p, e.lockRef.current));
  }, []);
  w.useEffect(function() {
    return an.push(a), e.setCallbacks({
      onScrollCapture: d,
      onWheelCapture: d,
      onTouchMoveCapture: f
    }), document.addEventListener("wheel", i, rn), document.addEventListener("touchmove", i, rn), document.addEventListener("touchstart", u, rn), function() {
      an = an.filter(function(p) {
        return p !== a;
      }), document.removeEventListener("wheel", i, rn), document.removeEventListener("touchmove", i, rn), document.removeEventListener("touchstart", u, rn);
    };
  }, []);
  var m = e.removeScrollBar, b = e.inert;
  return w.createElement(
    w.Fragment,
    null,
    b ? w.createElement(a, { styles: kv(r) }) : null,
    m ? w.createElement(il, { gapMode: "margin" }) : null
  );
}
const zv = cl(sl, Fv);
var fl = w.forwardRef(function(e, t) {
  return w.createElement($r, Le({}, e, { ref: t, sideCar: zv }));
});
fl.classNames = $r.classNames;
const xr = fl;
var Vv = function(e) {
  if (typeof document > "u")
    return null;
  var t = Array.isArray(e) ? e[0] : e;
  return t.ownerDocument.body;
}, cn = /* @__PURE__ */ new WeakMap(), Io = /* @__PURE__ */ new WeakMap(), Oo = {}, na = 0, pl = function(e) {
  return e && (e.host || pl(e.parentNode));
}, Hv = function(e, t) {
  return t.map(function(n) {
    if (e.contains(n))
      return n;
    var o = pl(n);
    return o && e.contains(o) ? o : (console.error("aria-hidden", n, "in not contained inside", e, ". Doing nothing"), null);
  }).filter(function(n) {
    return !!n;
  });
}, Bv = function(e, t, n, o) {
  var r = Hv(t, Array.isArray(e) ? e : [e]);
  Oo[n] || (Oo[n] = /* @__PURE__ */ new WeakMap());
  var a = Oo[n], c = [], s = /* @__PURE__ */ new Set(), i = new Set(r), l = function(d) {
    !d || s.has(d) || (s.add(d), l(d.parentNode));
  };
  r.forEach(l);
  var u = function(d) {
    !d || i.has(d) || Array.prototype.forEach.call(d.children, function(f) {
      if (s.has(f))
        u(f);
      else {
        var m = f.getAttribute(o), b = m !== null && m !== "false", p = (cn.get(f) || 0) + 1, g = (a.get(f) || 0) + 1;
        cn.set(f, p), a.set(f, g), c.push(f), p === 1 && b && Io.set(f, !0), g === 1 && f.setAttribute(n, "true"), b || f.setAttribute(o, "true");
      }
    });
  };
  return u(t), s.clear(), na++, function() {
    c.forEach(function(d) {
      var f = cn.get(d) - 1, m = a.get(d) - 1;
      cn.set(d, f), a.set(d, m), f || (Io.has(d) || d.removeAttribute(o), Io.delete(d)), m || d.removeAttribute(n);
    }), na--, na || (cn = /* @__PURE__ */ new WeakMap(), cn = /* @__PURE__ */ new WeakMap(), Io = /* @__PURE__ */ new WeakMap(), Oo = {});
  };
}, bo = function(e, t, n) {
  n === void 0 && (n = "data-aria-hidden");
  var o = Array.from(Array.isArray(e) ? e : [e]), r = t || Vv(e);
  return r ? (o.push.apply(o, Array.from(r.querySelectorAll("[aria-live]"))), Bv(o, r, n, "aria-hidden")) : function() {
    return null;
  };
};
const ml = "Dialog", [bl, vl] = we(ml), [Kv, at] = bl(ml), Gv = (e) => {
  const { __scopeDialog: t, children: n, open: o, defaultOpen: r, onOpenChange: a, modal: c = !0 } = e, s = A(null), i = A(null), [l = !1, u] = Se({
    prop: o,
    defaultProp: r,
    onChange: a
  });
  return /* @__PURE__ */ v(Kv, {
    scope: t,
    triggerRef: s,
    contentRef: i,
    contentId: Me(),
    titleId: Me(),
    descriptionId: Me(),
    open: l,
    onOpenChange: u,
    onOpenToggle: re(
      () => u(
        (d) => !d
      ),
      [
        u
      ]
    ),
    modal: c
  }, n);
}, Uv = "DialogTrigger", Wv = /* @__PURE__ */ _((e, t) => {
  const { __scopeDialog: n, ...o } = e, r = at(Uv, n), a = ae(t, r.triggerRef);
  return /* @__PURE__ */ v(Z.button, S({
    type: "button",
    "aria-haspopup": "dialog",
    "aria-expanded": r.open,
    "aria-controls": r.contentId,
    "data-state": pc(r.open)
  }, o, {
    ref: a,
    onClick: O(e.onClick, r.onOpenToggle)
  }));
}), gl = "DialogPortal", [jv, hl] = bl(gl, {
  forceMount: void 0
}), Yv = (e) => {
  const { __scopeDialog: t, forceMount: n, children: o, container: r } = e, a = at(gl, t);
  return /* @__PURE__ */ v(jv, {
    scope: t,
    forceMount: n
  }, Ke.map(
    o,
    (c) => /* @__PURE__ */ v(Ee, {
      present: n || a.open
    }, /* @__PURE__ */ v(mo, {
      asChild: !0,
      container: r
    }, c))
  ));
}, Sa = "DialogOverlay", Xv = /* @__PURE__ */ _((e, t) => {
  const n = hl(Sa, e.__scopeDialog), { forceMount: o = n.forceMount, ...r } = e, a = at(Sa, e.__scopeDialog);
  return a.modal ? /* @__PURE__ */ v(Ee, {
    present: o || a.open
  }, /* @__PURE__ */ v(qv, S({}, r, {
    ref: t
  }))) : null;
}), qv = /* @__PURE__ */ _((e, t) => {
  const { __scopeDialog: n, ...o } = e, r = at(Sa, n);
  return (
    // Make sure `Content` is scrollable even when it doesn't live inside `RemoveScroll`
    // ie. when `Overlay` and `Content` are siblings
    /* @__PURE__ */ v(xr, {
      as: gt,
      allowPinchZoom: !0,
      shards: [
        r.contentRef
      ]
    }, /* @__PURE__ */ v(Z.div, S({
      "data-state": pc(r.open)
    }, o, {
      ref: t,
      style: {
        pointerEvents: "auto",
        ...o.style
      }
    })))
  );
}), vn = "DialogContent", Zv = /* @__PURE__ */ _((e, t) => {
  const n = hl(vn, e.__scopeDialog), { forceMount: o = n.forceMount, ...r } = e, a = at(vn, e.__scopeDialog);
  return /* @__PURE__ */ v(Ee, {
    present: o || a.open
  }, a.modal ? /* @__PURE__ */ v(Qv, S({}, r, {
    ref: t
  })) : /* @__PURE__ */ v(Jv, S({}, r, {
    ref: t
  })));
}), Qv = /* @__PURE__ */ _((e, t) => {
  const n = at(vn, e.__scopeDialog), o = A(null), r = ae(t, n.contentRef, o);
  return j(() => {
    const a = o.current;
    if (a)
      return bo(a);
  }, []), /* @__PURE__ */ v($l, S({}, e, {
    ref: r,
    trapFocus: n.open,
    disableOutsidePointerEvents: !0,
    onCloseAutoFocus: O(e.onCloseAutoFocus, (a) => {
      var c;
      a.preventDefault(), (c = n.triggerRef.current) === null || c === void 0 || c.focus();
    }),
    onPointerDownOutside: O(e.onPointerDownOutside, (a) => {
      const c = a.detail.originalEvent, s = c.button === 0 && c.ctrlKey === !0;
      (c.button === 2 || s) && a.preventDefault();
    }),
    onFocusOutside: O(
      e.onFocusOutside,
      (a) => a.preventDefault()
    )
  }));
}), Jv = /* @__PURE__ */ _((e, t) => {
  const n = at(vn, e.__scopeDialog), o = A(!1), r = A(!1);
  return /* @__PURE__ */ v($l, S({}, e, {
    ref: t,
    trapFocus: !1,
    disableOutsidePointerEvents: !1,
    onCloseAutoFocus: (a) => {
      var c;
      if ((c = e.onCloseAutoFocus) === null || c === void 0 || c.call(e, a), !a.defaultPrevented) {
        var s;
        o.current || (s = n.triggerRef.current) === null || s === void 0 || s.focus(), a.preventDefault();
      }
      o.current = !1, r.current = !1;
    },
    onInteractOutside: (a) => {
      var c, s;
      (c = e.onInteractOutside) === null || c === void 0 || c.call(e, a), a.defaultPrevented || (o.current = !0, a.detail.originalEvent.type === "pointerdown" && (r.current = !0));
      const i = a.target;
      ((s = n.triggerRef.current) === null || s === void 0 ? void 0 : s.contains(i)) && a.preventDefault(), a.detail.originalEvent.type === "focusin" && r.current && a.preventDefault();
    }
  }));
}), $l = /* @__PURE__ */ _((e, t) => {
  const { __scopeDialog: n, trapFocus: o, onOpenAutoFocus: r, onCloseAutoFocus: a, ...c } = e, s = at(vn, n), i = A(null), l = ae(t, i);
  return hr(), /* @__PURE__ */ v(Ge, null, /* @__PURE__ */ v(gr, {
    asChild: !0,
    loop: !0,
    trapped: o,
    onMountAutoFocus: r,
    onUnmountAutoFocus: a
  }, /* @__PURE__ */ v(Ot, S({
    role: "dialog",
    id: s.contentId,
    "aria-describedby": s.descriptionId,
    "aria-labelledby": s.titleId,
    "data-state": pc(s.open)
  }, c, {
    ref: l,
    onDismiss: () => s.onOpenChange(!1)
  }))), !1);
}), xl = "DialogTitle", eg = /* @__PURE__ */ _((e, t) => {
  const { __scopeDialog: n, ...o } = e, r = at(xl, n);
  return /* @__PURE__ */ v(Z.h2, S({
    id: r.titleId
  }, o, {
    ref: t
  }));
}), tg = "DialogDescription", ng = /* @__PURE__ */ _((e, t) => {
  const { __scopeDialog: n, ...o } = e, r = at(tg, n);
  return /* @__PURE__ */ v(Z.p, S({
    id: r.descriptionId
  }, o, {
    ref: t
  }));
}), og = "DialogClose", rg = /* @__PURE__ */ _((e, t) => {
  const { __scopeDialog: n, ...o } = e, r = at(og, n);
  return /* @__PURE__ */ v(Z.button, S({
    type: "button"
  }, o, {
    ref: t,
    onClick: O(
      e.onClick,
      () => r.onOpenChange(!1)
    )
  }));
});
function pc(e) {
  return e ? "open" : "closed";
}
const ag = "DialogTitleWarning", [cg, M7] = Sm(ag, {
  contentName: vn,
  titleName: xl,
  docsSlug: "dialog"
}), wr = Gv, yr = Wv, Cr = Yv, Cn = Xv, Sn = Zv, En = eg, Pn = ng, Jt = rg, sg = "AlertDialog", [ig, D7] = we(sg, [
  vl
]), yt = vl(), lg = (e) => {
  const { __scopeAlertDialog: t, ...n } = e, o = yt(t);
  return /* @__PURE__ */ v(wr, S({}, o, n, {
    modal: !0
  }));
}, dg = /* @__PURE__ */ _((e, t) => {
  const { __scopeAlertDialog: n, ...o } = e, r = yt(n);
  return /* @__PURE__ */ v(yr, S({}, r, o, {
    ref: t
  }));
}), ug = (e) => {
  const { __scopeAlertDialog: t, ...n } = e, o = yt(t);
  return /* @__PURE__ */ v(Cr, S({}, o, n));
}, fg = /* @__PURE__ */ _((e, t) => {
  const { __scopeAlertDialog: n, ...o } = e, r = yt(n);
  return /* @__PURE__ */ v(Cn, S({}, r, o, {
    ref: t
  }));
}), wl = "AlertDialogContent", [pg, mg] = ig(wl), bg = /* @__PURE__ */ _((e, t) => {
  const { __scopeAlertDialog: n, children: o, ...r } = e, a = yt(n), c = A(null), s = ae(t, c), i = A(null);
  return /* @__PURE__ */ v(cg, {
    contentName: wl,
    titleName: vg,
    docsSlug: "alert-dialog"
  }, /* @__PURE__ */ v(pg, {
    scope: n,
    cancelRef: i
  }, /* @__PURE__ */ v(Sn, S({
    role: "alertdialog"
  }, a, r, {
    ref: s,
    onOpenAutoFocus: O(r.onOpenAutoFocus, (l) => {
      var u;
      l.preventDefault(), (u = i.current) === null || u === void 0 || u.focus({
        preventScroll: !0
      });
    }),
    onPointerDownOutside: (l) => l.preventDefault(),
    onInteractOutside: (l) => l.preventDefault()
  }), /* @__PURE__ */ v(oc, null, o), !1)));
}), vg = "AlertDialogTitle", gg = /* @__PURE__ */ _((e, t) => {
  const { __scopeAlertDialog: n, ...o } = e, r = yt(n);
  return /* @__PURE__ */ v(En, S({}, r, o, {
    ref: t
  }));
}), hg = /* @__PURE__ */ _((e, t) => {
  const { __scopeAlertDialog: n, ...o } = e, r = yt(n);
  return /* @__PURE__ */ v(Pn, S({}, r, o, {
    ref: t
  }));
}), $g = /* @__PURE__ */ _((e, t) => {
  const { __scopeAlertDialog: n, ...o } = e, r = yt(n);
  return /* @__PURE__ */ v(Jt, S({}, r, o, {
    ref: t
  }));
}), xg = "AlertDialogCancel", wg = /* @__PURE__ */ _((e, t) => {
  const { __scopeAlertDialog: n, ...o } = e, { cancelRef: r } = mg(xg, n), a = yt(n), c = ae(t, r);
  return /* @__PURE__ */ v(Jt, S({}, a, o, {
    ref: c
  }));
}), yg = lg, Cg = dg, Sg = ug, yl = fg, Cl = bg, Sl = $g, El = wg, Pl = gg, _l = hg;
function Tl(e) {
  var t, n, o = "";
  if (typeof e == "string" || typeof e == "number")
    o += e;
  else if (typeof e == "object")
    if (Array.isArray(e))
      for (t = 0; t < e.length; t++)
        e[t] && (n = Tl(e[t])) && (o && (o += " "), o += n);
    else
      for (t in e)
        e[t] && (o && (o += " "), o += t);
  return o;
}
function Eg() {
  for (var e, t, n = 0, o = ""; n < arguments.length; )
    (e = arguments[n++]) && (t = Tl(e)) && (o && (o += " "), o += t);
  return o;
}
const Ms = (e) => typeof e == "boolean" ? "".concat(e) : e === 0 ? "0" : e, Ds = Eg, kt = (e, t) => (n) => {
  var o;
  if ((t == null ? void 0 : t.variants) == null)
    return Ds(e, n == null ? void 0 : n.class, n == null ? void 0 : n.className);
  const { variants: r, defaultVariants: a } = t, c = Object.keys(r).map((l) => {
    const u = n == null ? void 0 : n[l], d = a == null ? void 0 : a[l];
    if (u === null)
      return null;
    const f = Ms(u) || Ms(d);
    return r[l][f];
  }), s = n && Object.entries(n).reduce((l, u) => {
    let [d, f] = u;
    return f === void 0 || (l[d] = f), l;
  }, {}), i = t == null || (o = t.compoundVariants) === null || o === void 0 ? void 0 : o.reduce((l, u) => {
    let { class: d, className: f, ...m } = u;
    return Object.entries(m).every((b) => {
      let [p, g] = b;
      return Array.isArray(g) ? g.includes({
        ...a,
        ...s
      }[p]) : {
        ...a,
        ...s
      }[p] === g;
    }) ? [
      ...l,
      d,
      f
    ] : l;
  }, []);
  return Ds(e, c, i, n == null ? void 0 : n.class, n == null ? void 0 : n.className);
}, Sr = kt(
  "inline-flex items-center justify-center whitespace-nowrap rounded-md text-sm font-medium ring-offset-background transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50",
  {
    variants: {
      variant: {
        default: "bg-primary text-primary-foreground hover:bg-primary/90",
        destructive: "bg-destructive text-destructive-foreground hover:bg-destructive/90",
        outline: "border border-input bg-background hover:bg-accent hover:text-accent-foreground",
        secondary: "bg-secondary text-secondary-foreground hover:bg-secondary/80",
        ghost: "hover:bg-accent hover:text-accent-foreground",
        link: "text-primary underline-offset-4 hover:underline"
      },
      size: {
        default: "h-10 px-4 py-2",
        sm: "h-9 rounded-md px-3",
        lg: "h-11 rounded-md px-8",
        icon: "h-10 w-10"
      }
    },
    defaultVariants: {
      variant: "default",
      size: "default"
    }
  }
), mc = w.forwardRef(({ className: e, variant: t, size: n, asChild: o = !1, ...r }, a) => /* @__PURE__ */ P(
  o ? gt : "button",
  {
    className: M(Sr({ variant: t, size: n, className: e })),
    ref: a,
    ...r
  }
));
mc.displayName = "Button";
const I7 = yg, O7 = Cg, Pg = Sg, Nl = w.forwardRef(({ className: e, ...t }, n) => /* @__PURE__ */ P(
  yl,
  {
    className: M(
      "fixed inset-0 z-50 bg-background/80 backdrop-blur-sm data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0",
      e
    ),
    ...t,
    ref: n
  }
));
Nl.displayName = yl.displayName;
const _g = w.forwardRef(({ className: e, ...t }, n) => /* @__PURE__ */ ve(Pg, { children: [
  /* @__PURE__ */ P(Nl, {}),
  /* @__PURE__ */ P(
    Cl,
    {
      ref: n,
      className: M(
        "fixed left-[50%] top-[50%] z-50 grid w-full max-w-lg translate-x-[-50%] translate-y-[-50%] gap-4 border bg-background p-6 shadow-lg duration-200 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[state=closed]:slide-out-to-left-1/2 data-[state=closed]:slide-out-to-top-[48%] data-[state=open]:slide-in-from-left-1/2 data-[state=open]:slide-in-from-top-[48%] sm:rounded-lg",
        e
      ),
      ...t
    }
  )
] }));
_g.displayName = Cl.displayName;
function Tg({
  className: e,
  ...t
}) {
  return /* @__PURE__ */ P(
    "div",
    {
      className: M("flex flex-col space-y-2 text-center sm:text-left", e),
      ...t
    }
  );
}
Tg.displayName = "AlertDialogHeader";
function Ng({
  className: e,
  ...t
}) {
  return /* @__PURE__ */ P(
    "div",
    {
      className: M("flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2", e),
      ...t
    }
  );
}
Ng.displayName = "AlertDialogFooter";
const Rg = w.forwardRef(({ className: e, ...t }, n) => /* @__PURE__ */ P(Pl, { ref: n, className: M("text-lg font-semibold", e), ...t }));
Rg.displayName = Pl.displayName;
const Ag = w.forwardRef(({ className: e, ...t }, n) => /* @__PURE__ */ P(
  _l,
  {
    ref: n,
    className: M("text-sm text-muted-foreground", e),
    ...t
  }
));
Ag.displayName = _l.displayName;
const Mg = w.forwardRef(({ className: e, ...t }, n) => /* @__PURE__ */ P(Sl, { ref: n, className: M(Sr(), e), ...t }));
Mg.displayName = Sl.displayName;
const Dg = w.forwardRef(({ className: e, ...t }, n) => /* @__PURE__ */ P(
  El,
  {
    ref: n,
    className: M(Sr({ variant: "outline" }), "mt-2 sm:mt-0", e),
    ...t
  }
));
Dg.displayName = El.displayName;
const Ig = kt(
  "relative w-full rounded-lg border p-4 [&>svg~*]:pl-7 [&>svg+div]:translate-y-[-3px] [&>svg]:absolute [&>svg]:left-4 [&>svg]:top-4 [&>svg]:text-foreground",
  {
    variants: {
      variant: {
        default: "bg-background text-foreground",
        destructive: "border-destructive/50 text-destructive dark:border-destructive [&>svg]:text-destructive"
      }
    },
    defaultVariants: {
      variant: "default"
    }
  }
), Og = w.forwardRef(({ className: e, variant: t, ...n }, o) => /* @__PURE__ */ P(
  "div",
  {
    ref: o,
    role: "alert",
    className: M(Ig({ variant: t }), e),
    ...n
  }
));
Og.displayName = "Alert";
const kg = w.forwardRef(({ className: e, ...t }, n) => /* @__PURE__ */ P(
  "h5",
  {
    ref: n,
    className: M("mb-1 font-medium leading-none tracking-tight", e),
    ...t
  }
));
kg.displayName = "AlertTitle";
const Lg = w.forwardRef(({ className: e, ...t }, n) => /* @__PURE__ */ P(
  "div",
  {
    ref: n,
    className: M("text-sm [&_p]:leading-relaxed", e),
    ...t
  }
));
Lg.displayName = "AlertDescription";
const Fg = /* @__PURE__ */ _((e, t) => {
  const { ratio: n = 1, style: o, ...r } = e;
  return /* @__PURE__ */ v("div", {
    style: {
      // ensures inner element is contained
      position: "relative",
      // ensures padding bottom trick maths works
      width: "100%",
      paddingBottom: `${100 / n}%`
    },
    "data-radix-aspect-ratio-wrapper": ""
  }, /* @__PURE__ */ v(Z.div, S({}, r, {
    ref: t,
    style: {
      ...o,
      // ensures children expand in ratio
      position: "absolute",
      top: 0,
      right: 0,
      bottom: 0,
      left: 0
    }
  })));
}), zg = Fg, k7 = zg, Rl = "Avatar", [Vg, L7] = we(Rl), [Hg, Al] = Vg(Rl), Bg = /* @__PURE__ */ _((e, t) => {
  const { __scopeAvatar: n, ...o } = e, [r, a] = q("idle");
  return /* @__PURE__ */ v(Hg, {
    scope: n,
    imageLoadingStatus: r,
    onImageLoadingStatusChange: a
  }, /* @__PURE__ */ v(Z.span, S({}, o, {
    ref: t
  })));
}), Kg = "AvatarImage", Gg = /* @__PURE__ */ _((e, t) => {
  const { __scopeAvatar: n, src: o, onLoadingStatusChange: r = () => {
  }, ...a } = e, c = Al(Kg, n), s = jg(o), i = ge((l) => {
    r(l), c.onImageLoadingStatusChange(l);
  });
  return Re(() => {
    s !== "idle" && i(s);
  }, [
    s,
    i
  ]), s === "loaded" ? /* @__PURE__ */ v(Z.img, S({}, a, {
    ref: t,
    src: o
  })) : null;
}), Ug = "AvatarFallback", Wg = /* @__PURE__ */ _((e, t) => {
  const { __scopeAvatar: n, delayMs: o, ...r } = e, a = Al(Ug, n), [c, s] = q(o === void 0);
  return j(() => {
    if (o !== void 0) {
      const i = window.setTimeout(
        () => s(!0),
        o
      );
      return () => window.clearTimeout(i);
    }
  }, [
    o
  ]), c && a.imageLoadingStatus !== "loaded" ? /* @__PURE__ */ v(Z.span, S({}, r, {
    ref: t
  })) : null;
});
function jg(e) {
  const [t, n] = q("idle");
  return Re(() => {
    if (!e) {
      n("error");
      return;
    }
    let o = !0;
    const r = new window.Image(), a = (c) => () => {
      o && n(c);
    };
    return n("loading"), r.onload = a("loaded"), r.onerror = a("error"), r.src = e, () => {
      o = !1;
    };
  }, [
    e
  ]), t;
}
const Ml = Bg, Dl = Gg, Il = Wg, Yg = w.forwardRef(({ className: e, ...t }, n) => /* @__PURE__ */ P(
  Ml,
  {
    ref: n,
    className: M("relative flex h-10 w-10 shrink-0 overflow-hidden rounded-full", e),
    ...t
  }
));
Yg.displayName = Ml.displayName;
const Xg = w.forwardRef(({ className: e, ...t }, n) => /* @__PURE__ */ P(
  Dl,
  {
    ref: n,
    className: M("aspect-square h-full w-full", e),
    ...t
  }
));
Xg.displayName = Dl.displayName;
const qg = w.forwardRef(({ className: e, ...t }, n) => /* @__PURE__ */ P(
  Il,
  {
    ref: n,
    className: M(
      "flex h-full w-full items-center justify-center rounded-full bg-muted",
      e
    ),
    ...t
  }
));
qg.displayName = Il.displayName;
const Zg = kt(
  "inline-flex items-center rounded-full border px-2.5 py-0.5 text-xs font-semibold transition-colors focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2",
  {
    variants: {
      variant: {
        default: "border-transparent bg-primary text-primary-foreground hover:bg-primary/80",
        secondary: "border-transparent bg-secondary text-secondary-foreground hover:bg-secondary/80",
        destructive: "border-transparent bg-destructive text-destructive-foreground hover:bg-destructive/80",
        outline: "text-foreground"
      }
    },
    defaultVariants: {
      variant: "default"
    }
  }
);
function F7({
  className: e,
  variant: t,
  ...n
}) {
  return /* @__PURE__ */ P("div", { className: M(Zg({ variant: t }), e), ...n });
}
const Qg = w.forwardRef(({ className: e, ...t }, n) => /* @__PURE__ */ P(
  "div",
  {
    ref: n,
    className: M("rounded-lg border bg-card text-card-foreground shadow-sm", e),
    ...t
  }
));
Qg.displayName = "Card";
const Jg = w.forwardRef(({ className: e, ...t }, n) => /* @__PURE__ */ P(
  "div",
  {
    ref: n,
    className: M("flex flex-col space-y-1.5 p-6", e),
    ...t
  }
));
Jg.displayName = "CardHeader";
const e0 = w.forwardRef(({ className: e, ...t }, n) => /* @__PURE__ */ P(
  "h3",
  {
    ref: n,
    className: M("text-2xl font-semibold leading-none tracking-tight", e),
    ...t
  }
));
e0.displayName = "CardTitle";
const t0 = w.forwardRef(({ className: e, ...t }, n) => /* @__PURE__ */ P(
  "p",
  {
    ref: n,
    className: M("text-sm text-muted-foreground", e),
    ...t
  }
));
t0.displayName = "CardDescription";
const n0 = w.forwardRef(({ className: e, ...t }, n) => /* @__PURE__ */ P("div", { ref: n, className: M("p-6 pt-0", e), ...t }));
n0.displayName = "CardContent";
const o0 = w.forwardRef(({ className: e, ...t }, n) => /* @__PURE__ */ P(
  "div",
  {
    ref: n,
    className: M("flex items-center p-6 pt-0", e),
    ...t
  }
));
o0.displayName = "CardFooter";
function r0(e) {
  return Object.prototype.toString.call(e) === "[object Object]";
}
function Is(e) {
  return r0(e) || Array.isArray(e);
}
function a0() {
  return !!(typeof window < "u" && window.document && window.document.createElement);
}
function bc(e, t) {
  const n = Object.keys(e), o = Object.keys(t);
  if (n.length !== o.length)
    return !1;
  const r = JSON.stringify(Object.keys(e.breakpoints || {})), a = JSON.stringify(Object.keys(t.breakpoints || {}));
  return r !== a ? !1 : n.every((c) => {
    const s = e[c], i = t[c];
    return typeof s == "function" ? `${s}` == `${i}` : !Is(s) || !Is(i) ? s === i : bc(s, i);
  });
}
function Os(e) {
  return e.concat().sort((t, n) => t.name > n.name ? 1 : -1).map((t) => t.options);
}
function c0(e, t) {
  if (e.length !== t.length)
    return !1;
  const n = Os(e), o = Os(t);
  return n.every((r, a) => {
    const c = o[a];
    return bc(r, c);
  });
}
function vc(e) {
  return typeof e == "number";
}
function Ea(e) {
  return typeof e == "string";
}
function gc(e) {
  return typeof e == "boolean";
}
function ks(e) {
  return Object.prototype.toString.call(e) === "[object Object]";
}
function _e(e) {
  return Math.abs(e);
}
function hc(e) {
  return Math.sign(e);
}
function jn(e, t) {
  return _e(e - t);
}
function s0(e, t) {
  if (e === 0 || t === 0 || _e(e) <= _e(t))
    return 0;
  const n = jn(_e(e), _e(t));
  return _e(n / e);
}
function qn(e) {
  return Zn(e).map(Number);
}
function nt(e) {
  return e[vo(e)];
}
function vo(e) {
  return Math.max(0, e.length - 1);
}
function $c(e, t) {
  return t === vo(e);
}
function Ls(e, t = 0) {
  return Array.from(Array(e), (n, o) => t + o);
}
function Zn(e) {
  return Object.keys(e);
}
function Ol(e, t) {
  return [e, t].reduce((n, o) => (Zn(o).forEach((r) => {
    const a = n[r], c = o[r], s = ks(a) && ks(c);
    n[r] = s ? Ol(a, c) : c;
  }), n), {});
}
function kl(e, t) {
  return typeof t.MouseEvent < "u" && e instanceof t.MouseEvent;
}
function i0(e, t) {
  const n = {
    start: o,
    center: r,
    end: a
  };
  function o() {
    return 0;
  }
  function r(i) {
    return a(i) / 2;
  }
  function a(i) {
    return t - i;
  }
  function c(i, l) {
    return Ea(e) ? n[e](i) : e(t, i, l);
  }
  return {
    measure: c
  };
}
function Qn() {
  let e = [];
  function t(r, a, c, s = {
    passive: !0
  }) {
    let i;
    if ("addEventListener" in r)
      r.addEventListener(a, c, s), i = () => r.removeEventListener(a, c, s);
    else {
      const l = r;
      l.addListener(c), i = () => l.removeListener(c);
    }
    return e.push(i), o;
  }
  function n() {
    e = e.filter((r) => r());
  }
  const o = {
    add: t,
    clear: n
  };
  return o;
}
function l0(e, t, n, o) {
  const r = Qn(), a = 1e3 / 60;
  let c = null, s = 0, i = 0;
  function l() {
    r.add(e, "visibilitychange", () => {
      e.hidden && b();
    });
  }
  function u() {
    m(), r.clear();
  }
  function d(g) {
    c || (c = g);
    const h = g - c;
    for (c = g, s += h; s >= a; )
      n(), s -= a;
    const $ = _e(s / a);
    o($), i && t.requestAnimationFrame(d);
  }
  function f() {
    i || (i = t.requestAnimationFrame(d));
  }
  function m() {
    t.cancelAnimationFrame(i), c = null, s = 0, i = 0;
  }
  function b() {
    c = null, s = 0;
  }
  return {
    init: l,
    destroy: u,
    start: f,
    stop: m,
    update: n,
    render: o
  };
}
function d0(e, t) {
  const n = e === "y" ? "y" : "x", o = e === "y" ? "x" : "y", r = s(), a = i();
  function c(u) {
    const {
      width: d,
      height: f
    } = u;
    return n === "x" ? d : f;
  }
  function s() {
    return n === "y" ? "top" : t === "rtl" ? "right" : "left";
  }
  function i() {
    return n === "y" ? "bottom" : t === "rtl" ? "left" : "right";
  }
  return {
    scroll: n,
    cross: o,
    startEdge: r,
    endEdge: a,
    measureSize: c
  };
}
function Yt(e = 0, t = 0) {
  const n = _e(e - t);
  function o(l) {
    return l < e;
  }
  function r(l) {
    return l > t;
  }
  function a(l) {
    return o(l) || r(l);
  }
  function c(l) {
    return a(l) ? o(l) ? e : t : l;
  }
  function s(l) {
    return n ? l - n * Math.ceil((l - t) / n) : l;
  }
  return {
    length: n,
    max: t,
    min: e,
    constrain: c,
    reachedAny: a,
    reachedMax: r,
    reachedMin: o,
    removeOffset: s
  };
}
function Ll(e, t, n) {
  const {
    constrain: o
  } = Yt(0, e), r = e + 1;
  let a = c(t);
  function c(f) {
    return n ? _e((r + f) % r) : o(f);
  }
  function s() {
    return a;
  }
  function i(f) {
    return a = c(f), d;
  }
  function l(f) {
    return u().set(s() + f);
  }
  function u() {
    return Ll(e, s(), n);
  }
  const d = {
    get: s,
    set: i,
    add: l,
    clone: u
  };
  return d;
}
function u0(e) {
  const t = e === "rtl" ? -1 : 1;
  function n(r) {
    return r * t;
  }
  return {
    apply: n
  };
}
function f0(e, t, n, o, r, a, c, s, i, l, u, d, f, m, b, p, g, h, $, x) {
  const {
    cross: C
  } = e, y = ["INPUT", "SELECT", "TEXTAREA"], E = {
    passive: !1
  }, T = Qn(), R = Qn(), N = Yt(50, 225).constrain(b.measure(20)), H = {
    mouse: 300,
    touch: 400
  }, K = {
    mouse: 500,
    touch: 600
  }, I = p ? 43 : 25;
  let Q = !1, D = 0, V = 0, J = !1, oe = !1, se = !1, Y = !1;
  function k(G) {
    if (!x)
      return;
    function de(fe) {
      (gc(x) || x(G, fe)) && B(fe);
    }
    const ue = n;
    T.add(ue, "dragstart", (fe) => fe.preventDefault(), E).add(ue, "touchmove", () => {
    }, E).add(ue, "touchend", () => {
    }).add(ue, "touchstart", de).add(ue, "mousedown", de).add(ue, "touchcancel", te).add(ue, "contextmenu", te).add(ue, "click", ce, !0);
  }
  function W() {
    T.clear(), R.clear();
  }
  function L() {
    const G = Y ? o : n;
    R.add(G, "touchmove", U, E).add(G, "touchend", te).add(G, "mousemove", U, E).add(G, "mouseup", te);
  }
  function z(G) {
    const de = G.nodeName || "";
    return y.includes(de);
  }
  function X() {
    return (p ? K : H)[Y ? "mouse" : "touch"];
  }
  function ee(G, de) {
    const ue = f.add(hc(G) * -1), fe = d.byDistance(G, !p).distance;
    return p || _e(G) < N ? fe : h && de ? fe * 0.5 : d.byIndex(ue.get(), 0).distance;
  }
  function B(G) {
    const de = kl(G, r);
    Y = de, !(de && G.button !== 0) && (z(G.target) || (se = p && de && !G.buttons && Q, Q = jn(a.get(), s.get()) >= 2, J = !0, c.pointerDown(G), u.useFriction(0).useDuration(0), a.set(s), L(), D = c.readPoint(G), V = c.readPoint(G, C), m.emit("pointerDown")));
  }
  function U(G) {
    const de = c.readPoint(G), ue = c.readPoint(G, C), fe = jn(de, D), Te = jn(ue, V);
    if (!oe && !Y && (!G.cancelable || (oe = fe > Te, !oe)))
      return te(G);
    const De = c.pointerMove(G);
    fe > g && (se = !0), u.useFriction(0.3).useDuration(1), i.start(), a.add(t.apply(De)), G.preventDefault();
  }
  function te(G) {
    const ue = d.byDistance(0, !1).index !== f.get(), fe = c.pointerUp(G) * X(), Te = ee(t.apply(fe), ue), De = s0(fe, Te), Oe = I - 10 * De, Ae = $ + De / 50;
    oe = !1, J = !1, R.clear(), u.useDuration(Oe).useFriction(Ae), l.distance(Te, !p), Y = !1, m.emit("pointerUp");
  }
  function ce(G) {
    se && (G.stopPropagation(), G.preventDefault());
  }
  function ie() {
    return J;
  }
  return {
    init: k,
    pointerDown: ie,
    destroy: W
  };
}
function p0(e, t) {
  let o, r;
  function a(d) {
    return d.timeStamp;
  }
  function c(d, f) {
    const b = `client${(f || e.scroll) === "x" ? "X" : "Y"}`;
    return (kl(d, t) ? d : d.touches[0])[b];
  }
  function s(d) {
    return o = d, r = d, c(d);
  }
  function i(d) {
    const f = c(d) - c(r), m = a(d) - a(o) > 170;
    return r = d, m && (o = d), f;
  }
  function l(d) {
    if (!o || !r)
      return 0;
    const f = c(r) - c(o), m = a(d) - a(o), b = a(d) - a(r) > 170, p = f / m;
    return m && !b && _e(p) > 0.1 ? p : 0;
  }
  return {
    pointerDown: s,
    pointerMove: i,
    pointerUp: l,
    readPoint: c
  };
}
function m0() {
  function e(n) {
    const {
      offsetTop: o,
      offsetLeft: r,
      offsetWidth: a,
      offsetHeight: c
    } = n;
    return {
      top: o,
      right: r + a,
      bottom: o + c,
      left: r,
      width: a,
      height: c
    };
  }
  return {
    measure: e
  };
}
function b0(e) {
  function t(o) {
    return e * (o / 100);
  }
  return {
    measure: t
  };
}
function v0(e, t, n, o, r, a, c) {
  let s, i, l = [], u = !1;
  function d(p) {
    return r.measureSize(c.measure(p));
  }
  function f(p) {
    if (!a)
      return;
    i = d(e), l = o.map(d);
    function g($) {
      for (const x of $) {
        const C = x.target === e, y = o.indexOf(x.target), E = C ? i : l[y], T = d(C ? e : o[y]);
        if (_e(T - E) >= 0.5) {
          n.requestAnimationFrame(() => {
            p.reInit(), t.emit("resize");
          });
          break;
        }
      }
    }
    s = new ResizeObserver(($) => {
      u || (gc(a) || a(p, $)) && g($);
    }), [e].concat(o).forEach(($) => s.observe($));
  }
  function m() {
    s && s.disconnect(), u = !0;
  }
  return {
    init: f,
    destroy: m
  };
}
function g0(e, t, n, o, r) {
  let a = 0, c = 0, s = o, i = r, l = e.get(), u = 0;
  function d() {
    const y = n.get() - e.get(), E = !s;
    let T = 0;
    return E ? (a = 0, e.set(n), T = y) : (a += y / s, a *= i, l += a, e.add(a), T = l - u), c = hc(T), u = l, C;
  }
  function f() {
    const y = n.get() - t.get();
    return _e(y) < 1e-3;
  }
  function m() {
    return s;
  }
  function b() {
    return c;
  }
  function p() {
    return a;
  }
  function g() {
    return $(o);
  }
  function h() {
    return x(r);
  }
  function $(y) {
    return s = y, C;
  }
  function x(y) {
    return i = y, C;
  }
  const C = {
    direction: b,
    duration: m,
    velocity: p,
    seek: d,
    settled: f,
    useBaseFriction: h,
    useBaseDuration: g,
    useFriction: x,
    useDuration: $
  };
  return C;
}
function h0(e, t, n, o, r) {
  const a = r.measure(10), c = r.measure(50), s = Yt(0.1, 0.99);
  let i = !1;
  function l() {
    return !(i || !e.reachedAny(n.get()) || !e.reachedAny(t.get()));
  }
  function u(m) {
    if (!l())
      return;
    const b = e.reachedMin(t.get()) ? "min" : "max", p = _e(e[b] - t.get()), g = n.get() - t.get(), h = s.constrain(p / c);
    n.subtract(g * h), !m && _e(g) < a && (n.set(e.constrain(n.get())), o.useDuration(25).useBaseFriction());
  }
  function d(m) {
    i = !m;
  }
  return {
    constrain: u,
    toggleActive: d
  };
}
function $0(e, t, n, o, r) {
  const a = Yt(-t + e, 0), c = d(), s = u(), i = f();
  function l(b, p) {
    return jn(b, p) < 1;
  }
  function u() {
    const b = c[0], p = nt(c), g = c.lastIndexOf(b), h = c.indexOf(p) + 1;
    return Yt(g, h);
  }
  function d() {
    return n.map((b, p) => {
      const {
        min: g,
        max: h
      } = a, $ = a.constrain(b), x = !p, C = $c(n, p);
      return x ? h : C || l(g, $) ? g : l(h, $) ? h : $;
    }).map((b) => parseFloat(b.toFixed(3)));
  }
  function f() {
    if (t <= e + r)
      return [a.max];
    if (o === "keepSnaps")
      return c;
    const {
      min: b,
      max: p
    } = s;
    return c.slice(b, p);
  }
  return {
    snapsContained: i,
    scrollContainLimit: s
  };
}
function x0(e, t, n) {
  const o = t[0], r = n ? o - e : nt(t);
  return {
    limit: Yt(r, o)
  };
}
function w0(e, t, n, o) {
  const a = t.min + 0.1, c = t.max + 0.1, {
    reachedMin: s,
    reachedMax: i
  } = Yt(a, c);
  function l(f) {
    return f === 1 ? i(n.get()) : f === -1 ? s(n.get()) : !1;
  }
  function u(f) {
    if (!l(f))
      return;
    const m = e * (f * -1);
    o.forEach((b) => b.add(m));
  }
  return {
    loop: u
  };
}
function y0(e) {
  const {
    max: t,
    length: n
  } = e;
  function o(a) {
    const c = a - t;
    return n ? c / -n : 0;
  }
  return {
    get: o
  };
}
function C0(e, t, n, o, r) {
  const {
    startEdge: a,
    endEdge: c
  } = e, {
    groupSlides: s
  } = r, i = d().map(t.measure), l = f(), u = m();
  function d() {
    return s(o).map((p) => nt(p)[c] - p[0][a]).map(_e);
  }
  function f() {
    return o.map((p) => n[a] - p[a]).map((p) => -_e(p));
  }
  function m() {
    return s(l).map((p) => p[0]).map((p, g) => p + i[g]);
  }
  return {
    snaps: l,
    snapsAligned: u
  };
}
function S0(e, t, n, o, r, a) {
  const {
    groupSlides: c
  } = r, {
    min: s,
    max: i
  } = o, l = u();
  function u() {
    const f = c(a), m = !e || t === "keepSnaps";
    return n.length === 1 ? [a] : m ? f : f.slice(s, i).map((b, p, g) => {
      const h = !p, $ = $c(g, p);
      if (h) {
        const x = nt(g[0]) + 1;
        return Ls(x);
      }
      if ($) {
        const x = vo(a) - nt(g)[0] + 1;
        return Ls(x, nt(g)[0]);
      }
      return b;
    });
  }
  return {
    slideRegistry: l
  };
}
function E0(e, t, n, o, r) {
  const {
    reachedAny: a,
    removeOffset: c,
    constrain: s
  } = o;
  function i(b) {
    return b.concat().sort((p, g) => _e(p) - _e(g))[0];
  }
  function l(b) {
    const p = e ? c(b) : s(b), g = t.map(($) => $ - p).map(($) => u($, 0)).map(($, x) => ({
      diff: $,
      index: x
    })).sort(($, x) => _e($.diff) - _e(x.diff)), {
      index: h
    } = g[0];
    return {
      index: h,
      distance: p
    };
  }
  function u(b, p) {
    const g = [b, b + n, b - n];
    if (!e)
      return g[0];
    if (!p)
      return i(g);
    const h = g.filter(($) => hc($) === p);
    return h.length ? i(h) : nt(g) - n;
  }
  function d(b, p) {
    const g = t[b] - r.get(), h = u(g, p);
    return {
      index: b,
      distance: h
    };
  }
  function f(b, p) {
    const g = r.get() + b, {
      index: h,
      distance: $
    } = l(g), x = !e && a(g);
    if (!p || x)
      return {
        index: h,
        distance: b
      };
    const C = t[h] - $, y = b + u(C, 0);
    return {
      index: h,
      distance: y
    };
  }
  return {
    byDistance: f,
    byIndex: d,
    shortcut: u
  };
}
function P0(e, t, n, o, r, a, c) {
  function s(d) {
    const f = d.distance, m = d.index !== t.get();
    a.add(f), f && (o.duration() ? e.start() : (e.update(), e.render(1), e.update())), m && (n.set(t.get()), t.set(d.index), c.emit("select"));
  }
  function i(d, f) {
    const m = r.byDistance(d, f);
    s(m);
  }
  function l(d, f) {
    const m = t.clone().set(d), b = r.byIndex(m.get(), f);
    s(b);
  }
  return {
    distance: i,
    index: l
  };
}
function _0(e, t, n, o, r, a) {
  let c = 0;
  function s() {
    a.add(document, "keydown", i, !1), t.forEach(l);
  }
  function i(d) {
    d.code === "Tab" && (c = (/* @__PURE__ */ new Date()).getTime());
  }
  function l(d) {
    const f = () => {
      if ((/* @__PURE__ */ new Date()).getTime() - c > 10)
        return;
      e.scrollLeft = 0;
      const p = t.indexOf(d), g = n.findIndex((h) => h.includes(p));
      vc(g) && (r.useDuration(0), o.index(g, 0));
    };
    a.add(d, "focus", f, {
      passive: !0,
      capture: !0
    });
  }
  return {
    init: s
  };
}
function jo(e) {
  let t = e;
  function n() {
    return t;
  }
  function o(i) {
    t = c(i);
  }
  function r(i) {
    t += c(i);
  }
  function a(i) {
    t -= c(i);
  }
  function c(i) {
    return vc(i) ? i : i.get();
  }
  return {
    get: n,
    set: o,
    add: r,
    subtract: a
  };
}
function Fl(e, t, n) {
  const o = e.scroll === "x" ? c : s, r = n.style;
  let a = !1;
  function c(f) {
    return `translate3d(${f}px,0px,0px)`;
  }
  function s(f) {
    return `translate3d(0px,${f}px,0px)`;
  }
  function i(f) {
    a || (r.transform = o(t.apply(f)));
  }
  function l(f) {
    a = !f;
  }
  function u() {
    a || (r.transform = "", n.getAttribute("style") || n.removeAttribute("style"));
  }
  return {
    clear: u,
    to: i,
    toggleActive: l
  };
}
function T0(e, t, n, o, r, a, c, s, i, l) {
  const d = qn(a), f = qn(a).reverse(), m = $().concat(x());
  function b(R, N) {
    return R.reduce((H, K) => H - a[K], N);
  }
  function p(R, N) {
    return R.reduce((H, K) => b(H, N) > 0 ? H.concat([K]) : H, []);
  }
  function g(R) {
    return c.map((N, H) => ({
      start: N - r[H] + 0.5 + R,
      end: N + n - 0.5 + R
    }));
  }
  function h(R, N, H) {
    const K = g(N);
    return R.map((I) => {
      const Q = H ? 0 : -o, D = H ? o : 0, V = H ? "end" : "start", J = K[I][V];
      return {
        index: I,
        loopPoint: J,
        slideLocation: jo(-1),
        translate: Fl(e, t, l[I]),
        target: () => i.get() > J ? Q : D
      };
    });
  }
  function $() {
    const R = s[0], N = p(f, R);
    return h(N, o, !1);
  }
  function x() {
    const R = n - s[0] - 1, N = p(d, R);
    return h(N, -o, !0);
  }
  function C() {
    return m.every(({
      index: R
    }) => {
      const N = d.filter((H) => H !== R);
      return b(N, n) <= 0.1;
    });
  }
  function y() {
    m.forEach((R) => {
      const {
        target: N,
        translate: H,
        slideLocation: K
      } = R, I = N();
      I !== K.get() && (H.to(I), K.set(I));
    });
  }
  function E() {
    m.forEach((R) => R.translate.clear());
  }
  return {
    canLoop: C,
    clear: E,
    loop: y,
    loopPoints: m
  };
}
function N0(e, t, n) {
  let o, r = !1;
  function a(i) {
    if (!n)
      return;
    function l(u) {
      for (const d of u)
        if (d.type === "childList") {
          i.reInit(), t.emit("slidesChanged");
          break;
        }
    }
    o = new MutationObserver((u) => {
      r || (gc(n) || n(i, u)) && l(u);
    }), o.observe(e, {
      childList: !0
    });
  }
  function c() {
    o && o.disconnect(), r = !0;
  }
  return {
    init: a,
    destroy: c
  };
}
function R0(e, t, n, o) {
  const r = {};
  let a = null, c = null, s, i = !1;
  function l() {
    s = new IntersectionObserver((b) => {
      i || (b.forEach((p) => {
        const g = t.indexOf(p.target);
        r[g] = p;
      }), a = null, c = null, n.emit("slidesInView"));
    }, {
      root: e.parentElement,
      threshold: o
    }), t.forEach((b) => s.observe(b));
  }
  function u() {
    s && s.disconnect(), i = !0;
  }
  function d(b) {
    return Zn(r).reduce((p, g) => {
      const h = parseInt(g), {
        isIntersecting: $
      } = r[h];
      return (b && $ || !b && !$) && p.push(h), p;
    }, []);
  }
  function f(b = !0) {
    if (b && a)
      return a;
    if (!b && c)
      return c;
    const p = d(b);
    return b && (a = p), b || (c = p), p;
  }
  return {
    init: l,
    destroy: u,
    get: f
  };
}
function A0(e, t, n, o, r, a) {
  const {
    measureSize: c,
    startEdge: s,
    endEdge: i
  } = e, l = n[0] && r, u = b(), d = p(), f = n.map(c), m = g();
  function b() {
    if (!l)
      return 0;
    const $ = n[0];
    return _e(t[s] - $[s]);
  }
  function p() {
    if (!l)
      return 0;
    const $ = a.getComputedStyle(nt(o));
    return parseFloat($.getPropertyValue(`margin-${i}`));
  }
  function g() {
    return n.map(($, x, C) => {
      const y = !x, E = $c(C, x);
      return y ? f[x] + u : E ? f[x] + d : C[x + 1][s] - $[s];
    }).map(_e);
  }
  return {
    slideSizes: f,
    slideSizesWithGaps: m,
    startGap: u,
    endGap: d
  };
}
function M0(e, t, n, o, r, a, c, s, i, l) {
  const {
    startEdge: u,
    endEdge: d
  } = e, f = vc(o);
  function m(h, $) {
    return qn(h).filter((x) => x % $ === 0).map((x) => h.slice(x, x + $));
  }
  function b(h) {
    return h.length ? qn(h).reduce(($, x) => {
      const C = nt($) || 0, y = C === 0, E = x === vo(h), T = a[u] - c[C][u], R = a[u] - c[x][d], N = !r && y ? t.apply(s) : 0, H = !r && E ? t.apply(i) : 0;
      return _e(R - H - (T + N)) > n + l && $.push(x), E && $.push(h.length), $;
    }, []).map(($, x, C) => {
      const y = Math.max(C[x - 1] || 0);
      return h.slice(y, $);
    }) : [];
  }
  function p(h) {
    return f ? m(h, o) : b(h);
  }
  return {
    groupSlides: p
  };
}
function D0(e, t, n, o, r, a, c) {
  const {
    align: s,
    axis: i,
    direction: l,
    startIndex: u,
    loop: d,
    duration: f,
    dragFree: m,
    dragThreshold: b,
    inViewThreshold: p,
    slidesToScroll: g,
    skipSnaps: h,
    containScroll: $,
    watchResize: x,
    watchSlides: C,
    watchDrag: y
  } = a, E = 2, T = m0(), R = T.measure(t), N = n.map(T.measure), H = u0(l), K = d0(i, l), I = K.measureSize(R), Q = b0(I), D = i0(s, I), V = !d && !!$, J = d || !!$, {
    slideSizes: oe,
    slideSizesWithGaps: se,
    startGap: Y,
    endGap: k
  } = A0(K, R, N, n, J, r), W = M0(K, H, I, g, d, R, N, Y, k, E), {
    snaps: L,
    snapsAligned: z
  } = C0(K, D, R, N, W), X = -nt(L) + nt(se), {
    snapsContained: ee,
    scrollContainLimit: B
  } = $0(I, X, z, $, E), U = V ? ee : z, {
    limit: te
  } = x0(X, U, d), ce = Ll(vo(U), u, d), ie = ce.clone(), ne = qn(n), G = ({
    dragHandler: ft,
    scrollBody: le,
    scrollBounds: me,
    options: {
      loop: he
    }
  }) => {
    he || me.constrain(ft.pointerDown()), le.seek();
  }, de = ({
    scrollBody: ft,
    translate: le,
    location: me,
    offsetLocation: he,
    scrollLooper: $e,
    slideLooper: ye,
    dragHandler: Ne,
    animation: ke,
    eventHandler: zt,
    options: {
      loop: pt
    }
  }, qe) => {
    const Vt = ft.velocity(), Ln = ft.settled();
    Ln && !Ne.pointerDown() && (ke.stop(), zt.emit("settle")), Ln || zt.emit("scroll"), he.set(me.get() - Vt + Vt * qe), pt && ($e.loop(ft.direction()), ye.loop()), le.to(he.get());
  }, ue = l0(o, r, () => G(kn), (ft) => de(kn, ft)), fe = 0.68, Te = U[ce.get()], De = jo(Te), Oe = jo(Te), Ae = jo(Te), et = g0(De, Oe, Ae, f, fe), tt = E0(d, U, X, te, Ae), In = P0(ue, ce, ie, et, tt, Ae, c), ut = y0(te), On = Qn(), Yr = R0(t, n, c, p), {
    slideRegistry: Ft
  } = S0(V, $, U, B, W, ne), Xr = _0(e, n, Ft, In, et, On), kn = {
    ownerDocument: o,
    ownerWindow: r,
    eventHandler: c,
    containerRect: R,
    slideRects: N,
    animation: ue,
    axis: K,
    direction: H,
    dragHandler: f0(K, H, e, o, r, Ae, p0(K, r), De, ue, In, et, tt, ce, c, Q, m, b, h, fe, y),
    eventStore: On,
    percentOfView: Q,
    index: ce,
    indexPrevious: ie,
    limit: te,
    location: De,
    offsetLocation: Oe,
    options: a,
    resizeHandler: v0(t, c, r, n, K, x, T),
    scrollBody: et,
    scrollBounds: h0(te, De, Ae, et, Q),
    scrollLooper: w0(X, te, Oe, [De, Oe, Ae]),
    scrollProgress: ut,
    scrollSnapList: U.map(ut.get),
    scrollSnaps: U,
    scrollTarget: tt,
    scrollTo: In,
    slideLooper: T0(K, H, I, X, oe, se, L, U, Oe, n),
    slideFocus: Xr,
    slidesHandler: N0(t, c, C),
    slidesInView: Yr,
    slideIndexes: ne,
    slideRegistry: Ft,
    slidesToScroll: W,
    target: Ae,
    translate: Fl(K, H, t)
  };
  return kn;
}
function I0() {
  const e = {};
  let t;
  function n(i) {
    t = i;
  }
  function o(i) {
    return e[i] || [];
  }
  function r(i) {
    return o(i).forEach((l) => l(t, i)), s;
  }
  function a(i, l) {
    return e[i] = o(i).concat([l]), s;
  }
  function c(i, l) {
    return e[i] = o(i).filter((u) => u !== l), s;
  }
  const s = {
    init: n,
    emit: r,
    off: c,
    on: a
  };
  return s;
}
const O0 = {
  align: "center",
  axis: "x",
  container: null,
  slides: null,
  containScroll: "trimSnaps",
  direction: "ltr",
  slidesToScroll: 1,
  inViewThreshold: 0,
  breakpoints: {},
  dragFree: !1,
  dragThreshold: 10,
  loop: !1,
  skipSnaps: !1,
  duration: 25,
  startIndex: 0,
  active: !0,
  watchDrag: !0,
  watchResize: !0,
  watchSlides: !0
};
function k0(e) {
  function t(a, c) {
    return Ol(a, c || {});
  }
  function n(a) {
    const c = a.breakpoints || {}, s = Zn(c).filter((i) => e.matchMedia(i).matches).map((i) => c[i]).reduce((i, l) => t(i, l), {});
    return t(a, s);
  }
  function o(a) {
    return a.map((c) => Zn(c.breakpoints || {})).reduce((c, s) => c.concat(s), []).map(e.matchMedia);
  }
  return {
    mergeOptions: t,
    optionsAtMedia: n,
    optionsMediaQueries: o
  };
}
function L0(e) {
  let t = [];
  function n(a, c) {
    return t = c.filter(({
      options: s
    }) => e.optionsAtMedia(s).active !== !1), t.forEach((s) => s.init(a, e)), c.reduce((s, i) => Object.assign(s, {
      [i.name]: i
    }), {});
  }
  function o() {
    t = t.filter((a) => a.destroy());
  }
  return {
    init: n,
    destroy: o
  };
}
function Qo(e, t, n) {
  const o = e.ownerDocument, r = o.defaultView, a = k0(r), c = L0(a), s = Qn(), i = I0(), {
    mergeOptions: l,
    optionsAtMedia: u,
    optionsMediaQueries: d
  } = a, {
    on: f,
    off: m,
    emit: b
  } = i, p = K;
  let g = !1, h, $ = l(O0, Qo.globalOptions), x = l($), C = [], y, E, T;
  function R() {
    const {
      container: ne,
      slides: G
    } = x;
    E = (Ea(ne) ? e.querySelector(ne) : ne) || e.children[0];
    const ue = Ea(G) ? E.querySelectorAll(G) : G;
    T = [].slice.call(ue || E.children);
  }
  function N(ne) {
    const G = D0(e, E, T, o, r, ne, i);
    if (ne.loop && !G.slideLooper.canLoop()) {
      const de = Object.assign({}, ne, {
        loop: !1
      });
      return N(de);
    }
    return G;
  }
  function H(ne, G) {
    g || ($ = l($, ne), x = u($), C = G || C, R(), h = N(x), d([$, ...C.map(({
      options: de
    }) => de)]).forEach((de) => s.add(de, "change", K)), x.active && (h.translate.to(h.location.get()), h.animation.init(), h.slidesInView.init(), h.slideFocus.init(), h.eventHandler.init(ie), h.resizeHandler.init(ie), h.slidesHandler.init(ie), h.options.loop && h.slideLooper.loop(), E.offsetParent && T.length && h.dragHandler.init(ie), y = c.init(ie, C)));
  }
  function K(ne, G) {
    const de = W();
    I(), H(l({
      startIndex: de
    }, ne), G), i.emit("reInit");
  }
  function I() {
    h.dragHandler.destroy(), h.eventStore.clear(), h.translate.clear(), h.slideLooper.clear(), h.resizeHandler.destroy(), h.slidesHandler.destroy(), h.slidesInView.destroy(), h.animation.destroy(), c.destroy(), s.clear();
  }
  function Q() {
    g || (g = !0, s.clear(), I(), i.emit("destroy"));
  }
  function D(ne, G, de) {
    !x.active || g || (h.scrollBody.useBaseFriction().useDuration(G === !0 ? 0 : x.duration), h.scrollTo.index(ne, de || 0));
  }
  function V(ne) {
    const G = h.index.add(1).get();
    D(G, ne, -1);
  }
  function J(ne) {
    const G = h.index.add(-1).get();
    D(G, ne, 1);
  }
  function oe() {
    return h.index.add(1).get() !== W();
  }
  function se() {
    return h.index.add(-1).get() !== W();
  }
  function Y() {
    return h.scrollSnapList;
  }
  function k() {
    return h.scrollProgress.get(h.location.get());
  }
  function W() {
    return h.index.get();
  }
  function L() {
    return h.indexPrevious.get();
  }
  function z() {
    return h.slidesInView.get();
  }
  function X() {
    return h.slidesInView.get(!1);
  }
  function ee() {
    return y;
  }
  function B() {
    return h;
  }
  function U() {
    return e;
  }
  function te() {
    return E;
  }
  function ce() {
    return T;
  }
  const ie = {
    canScrollNext: oe,
    canScrollPrev: se,
    containerNode: te,
    internalEngine: B,
    destroy: Q,
    off: m,
    on: f,
    emit: b,
    plugins: ee,
    previousScrollSnap: L,
    reInit: p,
    rootNode: U,
    scrollNext: V,
    scrollPrev: J,
    scrollProgress: k,
    scrollSnapList: Y,
    scrollTo: D,
    selectedScrollSnap: W,
    slideNodes: ce,
    slidesInView: z,
    slidesNotInView: X
  };
  return H(t, n), setTimeout(() => i.emit("init"), 0), ie;
}
Qo.globalOptions = void 0;
function xc(e = {}, t = []) {
  const n = A(e), o = A(t), [r, a] = q(), [c, s] = q(), i = re(() => {
    r && r.reInit(n.current, o.current);
  }, [r]);
  return j(() => {
    if (a0() && c) {
      Qo.globalOptions = xc.globalOptions;
      const l = Qo(c, n.current, o.current);
      return a(l), () => l.destroy();
    } else
      a(void 0);
  }, [c, a]), j(() => {
    bc(n.current, e) || (n.current = e, i());
  }, [e, i]), j(() => {
    c0(o.current, t) || (o.current = t, i());
  }, [t, i]), [s, r];
}
xc.globalOptions = void 0;
const zl = w.createContext(null);
function Er() {
  const e = w.useContext(zl);
  if (!e)
    throw new Error("useCarousel must be used within a <Carousel />");
  return e;
}
const F0 = w.forwardRef(({
  orientation: e = "horizontal",
  opts: t,
  setApi: n,
  plugins: o,
  className: r,
  children: a,
  ...c
}, s) => {
  const [i, l] = xc({
    ...t,
    axis: e === "horizontal" ? "x" : "y"
  }, o), [u, d] = w.useState(!1), [f, m] = w.useState(!1), b = w.useCallback(($) => {
    $ && (d($.canScrollPrev()), m($.canScrollNext()));
  }, []), p = w.useCallback(() => {
    l == null || l.scrollPrev();
  }, [l]), g = w.useCallback(() => {
    l == null || l.scrollNext();
  }, [l]), h = w.useCallback(($) => {
    $.key === "ArrowLeft" ? ($.preventDefault(), p()) : $.key === "ArrowRight" && ($.preventDefault(), g());
  }, [p, g]);
  return w.useEffect(() => {
    !l || !n || n(l);
  }, [l, n]), w.useEffect(() => {
    if (l)
      return b(l), l.on("reInit", b), l.on("select", b), () => {
        l == null || l.off("select", b);
      };
  }, [l, b]), /* @__PURE__ */ P(
    zl.Provider,
    {
      value: {
        carouselRef: i,
        api: l,
        opts: t,
        orientation: e || ((t == null ? void 0 : t.axis) === "y" ? "vertical" : "horizontal"),
        scrollPrev: p,
        scrollNext: g,
        canScrollPrev: u,
        canScrollNext: f
      },
      children: /* @__PURE__ */ P(
        "div",
        {
          ref: s,
          onKeyDownCapture: h,
          className: M("relative", r),
          role: "region",
          "aria-roledescription": "carousel",
          ...c,
          children: a
        }
      )
    }
  );
});
F0.displayName = "Carousel";
const z0 = w.forwardRef(({ className: e, ...t }, n) => {
  const { carouselRef: o, orientation: r } = Er();
  return /* @__PURE__ */ P("div", { ref: o, className: "overflow-hidden", children: /* @__PURE__ */ P(
    "div",
    {
      ref: n,
      className: M(
        "flex",
        r === "horizontal" ? "-ml-4" : "-mt-4 flex-col",
        e
      ),
      ...t
    }
  ) });
});
z0.displayName = "CarouselContent";
const V0 = w.forwardRef(({ className: e, ...t }, n) => {
  const { orientation: o } = Er();
  return /* @__PURE__ */ P(
    "div",
    {
      ref: n,
      role: "group",
      "aria-roledescription": "slide",
      className: M(
        "min-w-0 shrink-0 grow-0 basis-full",
        o === "horizontal" ? "pl-4" : "pt-4",
        e
      ),
      ...t
    }
  );
});
V0.displayName = "CarouselItem";
const H0 = w.forwardRef(({ className: e, variant: t = "outline", size: n = "icon", ...o }, r) => {
  const { orientation: a, scrollPrev: c, canScrollPrev: s } = Er();
  return /* @__PURE__ */ ve(
    mc,
    {
      ref: r,
      variant: t,
      size: n,
      className: M("absolute  h-8 w-8 rounded-full", a === "horizontal" ? "-left-12 top-1/2 -translate-y-1/2" : "-top-12 left-1/2 -translate-x-1/2 rotate-90", e),
      disabled: !s,
      onClick: c,
      ...o,
      children: [
        /* @__PURE__ */ P(lb, { className: "h-4 w-4" }),
        /* @__PURE__ */ P("span", { className: "sr-only", children: "Previous slide" })
      ]
    }
  );
});
H0.displayName = "CarouselPrevious";
const B0 = w.forwardRef(({ className: e, variant: t = "outline", size: n = "icon", ...o }, r) => {
  const { orientation: a, scrollNext: c, canScrollNext: s } = Er();
  return /* @__PURE__ */ ve(
    mc,
    {
      ref: r,
      variant: t,
      size: n,
      className: M("absolute h-8 w-8 rounded-full", a === "horizontal" ? "-right-12 top-1/2 -translate-y-1/2" : "-bottom-12 left-1/2 -translate-x-1/2 rotate-90", e),
      disabled: !s,
      onClick: c,
      ...o,
      children: [
        /* @__PURE__ */ P(db, { className: "h-4 w-4" }),
        /* @__PURE__ */ P("span", { className: "sr-only", children: "Next slide" })
      ]
    }
  );
});
B0.displayName = "CarouselNext";
function _n(e) {
  const t = A({
    value: e,
    previous: e
  });
  return Fe(() => (t.current.value !== e && (t.current.previous = t.current.value, t.current.value = e), t.current.previous), [
    e
  ]);
}
function go(e) {
  const [t, n] = q(void 0);
  return Re(() => {
    if (e) {
      n({
        width: e.offsetWidth,
        height: e.offsetHeight
      });
      const o = new ResizeObserver((r) => {
        if (!Array.isArray(r) || !r.length)
          return;
        const a = r[0];
        let c, s;
        if ("borderBoxSize" in a) {
          const i = a.borderBoxSize, l = Array.isArray(i) ? i[0] : i;
          c = l.inlineSize, s = l.blockSize;
        } else
          c = e.offsetWidth, s = e.offsetHeight;
        n({
          width: c,
          height: s
        });
      });
      return o.observe(e, {
        box: "border-box"
      }), () => o.unobserve(e);
    } else
      n(void 0);
  }, [
    e
  ]), t;
}
const Vl = "Checkbox", [K0, z7] = we(Vl), [G0, U0] = K0(Vl), W0 = /* @__PURE__ */ _((e, t) => {
  const { __scopeCheckbox: n, name: o, checked: r, defaultChecked: a, required: c, disabled: s, value: i = "on", onCheckedChange: l, ...u } = e, [d, f] = q(null), m = ae(
    t,
    (x) => f(x)
  ), b = A(!1), p = d ? !!d.closest("form") : !0, [g = !1, h] = Se({
    prop: r,
    defaultProp: a,
    onChange: l
  }), $ = A(g);
  return j(() => {
    const x = d == null ? void 0 : d.form;
    if (x) {
      const C = () => h($.current);
      return x.addEventListener("reset", C), () => x.removeEventListener("reset", C);
    }
  }, [
    d,
    h
  ]), /* @__PURE__ */ v(G0, {
    scope: n,
    state: g,
    disabled: s
  }, /* @__PURE__ */ v(Z.button, S({
    type: "button",
    role: "checkbox",
    "aria-checked": Wt(g) ? "mixed" : g,
    "aria-required": c,
    "data-state": Hl(g),
    "data-disabled": s ? "" : void 0,
    disabled: s,
    value: i
  }, u, {
    ref: m,
    onKeyDown: O(e.onKeyDown, (x) => {
      x.key === "Enter" && x.preventDefault();
    }),
    onClick: O(e.onClick, (x) => {
      h(
        (C) => Wt(C) ? !0 : !C
      ), p && (b.current = x.isPropagationStopped(), b.current || x.stopPropagation());
    })
  })), p && /* @__PURE__ */ v(X0, {
    control: d,
    bubbles: !b.current,
    name: o,
    value: i,
    checked: g,
    required: c,
    disabled: s,
    style: {
      transform: "translateX(-100%)"
    }
  }));
}), j0 = "CheckboxIndicator", Y0 = /* @__PURE__ */ _((e, t) => {
  const { __scopeCheckbox: n, forceMount: o, ...r } = e, a = U0(j0, n);
  return /* @__PURE__ */ v(Ee, {
    present: o || Wt(a.state) || a.state === !0
  }, /* @__PURE__ */ v(Z.span, S({
    "data-state": Hl(a.state),
    "data-disabled": a.disabled ? "" : void 0
  }, r, {
    ref: t,
    style: {
      pointerEvents: "none",
      ...e.style
    }
  })));
}), X0 = (e) => {
  const { control: t, checked: n, bubbles: o = !0, ...r } = e, a = A(null), c = _n(n), s = go(t);
  return j(() => {
    const i = a.current, l = window.HTMLInputElement.prototype, d = Object.getOwnPropertyDescriptor(l, "checked").set;
    if (c !== n && d) {
      const f = new Event("click", {
        bubbles: o
      });
      i.indeterminate = Wt(n), d.call(i, Wt(n) ? !1 : n), i.dispatchEvent(f);
    }
  }, [
    c,
    n,
    o
  ]), /* @__PURE__ */ v("input", S({
    type: "checkbox",
    "aria-hidden": !0,
    defaultChecked: Wt(n) ? !1 : n
  }, r, {
    tabIndex: -1,
    ref: a,
    style: {
      ...e.style,
      ...s,
      position: "absolute",
      pointerEvents: "none",
      opacity: 0,
      margin: 0
    }
  }));
};
function Wt(e) {
  return e === "indeterminate";
}
function Hl(e) {
  return Wt(e) ? "indeterminate" : e ? "checked" : "unchecked";
}
const Bl = W0, q0 = Y0, Z0 = w.forwardRef(({ className: e, ...t }, n) => /* @__PURE__ */ P(
  Bl,
  {
    ref: n,
    className: M(
      "peer h-4 w-4 shrink-0 rounded-sm border border-primary ring-offset-background focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50 data-[state=checked]:bg-primary data-[state=checked]:text-primary-foreground",
      e
    ),
    ...t,
    children: /* @__PURE__ */ P(q0, { className: M("flex items-center justify-center text-current"), children: /* @__PURE__ */ P(po, { className: "h-4 w-4" }) })
  }
));
Z0.displayName = Bl.displayName;
const V7 = zi, H7 = ki, B7 = Fi;
var Fs = 1, Q0 = 0.9, J0 = 0.8, eh = 0.17, oa = 0.1, ra = 0.999, th = 0.9999, nh = 0.99, oh = /[\\\/_+.#"@\[\(\{&]/, rh = /[\\\/_+.#"@\[\(\{&]/g, ah = /[\s-]/, Kl = /[\s-]/g;
function Pa(e, t, n, o, r, a, c) {
  if (a === t.length)
    return r === e.length ? Fs : nh;
  var s = `${r},${a}`;
  if (c[s] !== void 0)
    return c[s];
  for (var i = o.charAt(a), l = n.indexOf(i, r), u = 0, d, f, m, b; l >= 0; )
    d = Pa(e, t, n, o, l + 1, a + 1, c), d > u && (l === r ? d *= Fs : oh.test(e.charAt(l - 1)) ? (d *= J0, m = e.slice(r, l - 1).match(rh), m && r > 0 && (d *= Math.pow(ra, m.length))) : ah.test(e.charAt(l - 1)) ? (d *= Q0, b = e.slice(r, l - 1).match(Kl), b && r > 0 && (d *= Math.pow(ra, b.length))) : (d *= eh, r > 0 && (d *= Math.pow(ra, l - r))), e.charAt(l) !== t.charAt(a) && (d *= th)), (d < oa && n.charAt(l - 1) === o.charAt(a + 1) || o.charAt(a + 1) === o.charAt(a) && n.charAt(l - 1) !== o.charAt(a)) && (f = Pa(e, t, n, o, l + 1, a + 2, c), f * oa > d && (d = f * oa)), d > u && (u = d), l = n.indexOf(i, l + 1);
  return c[s] = u, u;
}
function zs(e) {
  return e.toLowerCase().replace(Kl, " ");
}
function ch(e, t) {
  return Pa(e, t, zs(e), zs(t), 0, 0, {});
}
function mn(e, t, { checkForDefaultPrevented: n = !0 } = {}) {
  return function(r) {
    if (e == null || e(r), n === !1 || !r.defaultPrevented)
      return t == null ? void 0 : t(r);
  };
}
function sh(e, t) {
  typeof e == "function" ? e(t) : e != null && (e.current = t);
}
function Gl(...e) {
  return (t) => e.forEach(
    (n) => sh(n, t)
  );
}
function ho(...e) {
  return re(Gl(...e), e);
}
function ih(e, t = []) {
  let n = [];
  function o(a, c) {
    const s = /* @__PURE__ */ Nt(c), i = n.length;
    n = [
      ...n,
      c
    ];
    function l(d) {
      const { scope: f, children: m, ...b } = d, p = (f == null ? void 0 : f[e][i]) || s, g = Fe(
        () => b,
        Object.values(b)
      );
      return /* @__PURE__ */ v(p.Provider, {
        value: g
      }, m);
    }
    function u(d, f) {
      const m = (f == null ? void 0 : f[e][i]) || s, b = Qt(m);
      if (b)
        return b;
      if (c !== void 0)
        return c;
      throw new Error(`\`${d}\` must be used within \`${a}\``);
    }
    return l.displayName = a + "Provider", [
      l,
      u
    ];
  }
  const r = () => {
    const a = n.map((c) => /* @__PURE__ */ Nt(c));
    return function(s) {
      const i = (s == null ? void 0 : s[e]) || a;
      return Fe(
        () => ({
          [`__scope${e}`]: {
            ...s,
            [e]: i
          }
        }),
        [
          s,
          i
        ]
      );
    };
  };
  return r.scopeName = e, [
    o,
    lh(r, ...t)
  ];
}
function lh(...e) {
  const t = e[0];
  if (e.length === 1)
    return t;
  const n = () => {
    const o = e.map(
      (r) => ({
        useScope: r(),
        scopeName: r.scopeName
      })
    );
    return function(a) {
      const c = o.reduce((s, { useScope: i, scopeName: l }) => {
        const d = i(a)[`__scope${l}`];
        return {
          ...s,
          ...d
        };
      }, {});
      return Fe(
        () => ({
          [`__scope${t.scopeName}`]: c
        }),
        [
          c
        ]
      );
    };
  };
  return n.scopeName = t.scopeName, n;
}
const _a = globalThis != null && globalThis.document ? dr : () => {
}, dh = w.useId || (() => {
});
let uh = 0;
function aa(e) {
  const [t, n] = w.useState(dh());
  return _a(() => {
    e || n(
      (o) => o ?? String(uh++)
    );
  }, [
    e
  ]), e || (t ? `radix-${t}` : "");
}
function Xt(e) {
  const t = A(e);
  return j(() => {
    t.current = e;
  }), Fe(
    () => (...n) => {
      var o;
      return (o = t.current) === null || o === void 0 ? void 0 : o.call(t, ...n);
    },
    []
  );
}
function fh({ prop: e, defaultProp: t, onChange: n = () => {
} }) {
  const [o, r] = ph({
    defaultProp: t,
    onChange: n
  }), a = e !== void 0, c = a ? e : o, s = Xt(n), i = re((l) => {
    if (a) {
      const d = typeof l == "function" ? l(e) : l;
      d !== e && s(d);
    } else
      r(l);
  }, [
    a,
    e,
    r,
    s
  ]);
  return [
    c,
    i
  ];
}
function ph({ defaultProp: e, onChange: t }) {
  const n = q(e), [o] = n, r = A(o), a = Xt(t);
  return j(() => {
    r.current !== o && (a(o), r.current = o);
  }, [
    o,
    r,
    a
  ]), n;
}
const wc = /* @__PURE__ */ _((e, t) => {
  const { children: n, ...o } = e, r = Ke.toArray(n), a = r.find(bh);
  if (a) {
    const c = a.props.children, s = r.map((i) => i === a ? Ke.count(c) > 1 ? Ke.only(null) : /* @__PURE__ */ Rt(c) ? c.props.children : null : i);
    return /* @__PURE__ */ v(Ta, S({}, o, {
      ref: t
    }), /* @__PURE__ */ Rt(c) ? /* @__PURE__ */ wn(c, void 0, s) : null);
  }
  return /* @__PURE__ */ v(Ta, S({}, o, {
    ref: t
  }), n);
});
wc.displayName = "Slot";
const Ta = /* @__PURE__ */ _((e, t) => {
  const { children: n, ...o } = e;
  return /* @__PURE__ */ Rt(n) ? /* @__PURE__ */ wn(n, {
    ...vh(o, n.props),
    ref: Gl(t, n.ref)
  }) : Ke.count(n) > 1 ? Ke.only(null) : null;
});
Ta.displayName = "SlotClone";
const mh = ({ children: e }) => /* @__PURE__ */ v(Ge, null, e);
function bh(e) {
  return /* @__PURE__ */ Rt(e) && e.type === mh;
}
function vh(e, t) {
  const n = {
    ...t
  };
  for (const o in t) {
    const r = e[o], a = t[o];
    /^on[A-Z]/.test(o) ? n[o] = (...s) => {
      a == null || a(...s), r == null || r(...s);
    } : o === "style" ? n[o] = {
      ...r,
      ...a
    } : o === "className" && (n[o] = [
      r,
      a
    ].filter(Boolean).join(" "));
  }
  return {
    ...e,
    ...n
  };
}
const gh = [
  "a",
  "button",
  "div",
  "h2",
  "h3",
  "img",
  "li",
  "nav",
  "ol",
  "p",
  "span",
  "svg",
  "ul"
], Pr = gh.reduce((e, t) => {
  const n = /* @__PURE__ */ _((o, r) => {
    const { asChild: a, ...c } = o, s = a ? wc : t;
    return j(() => {
      window[Symbol.for("radix-ui")] = !0;
    }, []), /* @__PURE__ */ v(s, S({}, c, {
      ref: r
    }));
  });
  return n.displayName = `Primitive.${t}`, {
    ...e,
    [t]: n
  };
}, {});
function hh(e, t) {
  e && ur(
    () => e.dispatchEvent(t)
  );
}
function $h(e) {
  const t = Xt(e);
  j(() => {
    const n = (o) => {
      o.key === "Escape" && t(o);
    };
    return document.addEventListener("keydown", n), () => document.removeEventListener("keydown", n);
  }, [
    t
  ]);
}
const Na = "dismissableLayer.update", xh = "dismissableLayer.pointerDownOutside", wh = "dismissableLayer.focusOutside";
let Vs;
const yh = /* @__PURE__ */ Nt({
  layers: /* @__PURE__ */ new Set(),
  layersWithOutsidePointerEventsDisabled: /* @__PURE__ */ new Set(),
  branches: /* @__PURE__ */ new Set()
}), Ch = /* @__PURE__ */ _((e, t) => {
  const { disableOutsidePointerEvents: n = !1, onEscapeKeyDown: o, onPointerDownOutside: r, onFocusOutside: a, onInteractOutside: c, onDismiss: s, ...i } = e, l = Qt(yh), [u, d] = q(null), [, f] = q({}), m = ho(
    t,
    (E) => d(E)
  ), b = Array.from(l.layers), [p] = [
    ...l.layersWithOutsidePointerEventsDisabled
  ].slice(-1), g = b.indexOf(p), h = u ? b.indexOf(u) : -1, $ = l.layersWithOutsidePointerEventsDisabled.size > 0, x = h >= g, C = Sh((E) => {
    const T = E.target, R = [
      ...l.branches
    ].some(
      (N) => N.contains(T)
    );
    !x || R || (r == null || r(E), c == null || c(E), E.defaultPrevented || s == null || s());
  }), y = Eh((E) => {
    const T = E.target;
    [
      ...l.branches
    ].some(
      (N) => N.contains(T)
    ) || (a == null || a(E), c == null || c(E), E.defaultPrevented || s == null || s());
  });
  return $h((E) => {
    h === l.layers.size - 1 && (o == null || o(E), !E.defaultPrevented && s && (E.preventDefault(), s()));
  }), j(() => {
    if (u)
      return n && (l.layersWithOutsidePointerEventsDisabled.size === 0 && (Vs = document.body.style.pointerEvents, document.body.style.pointerEvents = "none"), l.layersWithOutsidePointerEventsDisabled.add(u)), l.layers.add(u), Hs(), () => {
        n && l.layersWithOutsidePointerEventsDisabled.size === 1 && (document.body.style.pointerEvents = Vs);
      };
  }, [
    u,
    n,
    l
  ]), j(() => () => {
    u && (l.layers.delete(u), l.layersWithOutsidePointerEventsDisabled.delete(u), Hs());
  }, [
    u,
    l
  ]), j(() => {
    const E = () => f({});
    return document.addEventListener(Na, E), () => document.removeEventListener(Na, E);
  }, []), /* @__PURE__ */ v(Pr.div, S({}, i, {
    ref: m,
    style: {
      pointerEvents: $ ? x ? "auto" : "none" : void 0,
      ...e.style
    },
    onFocusCapture: mn(e.onFocusCapture, y.onFocusCapture),
    onBlurCapture: mn(e.onBlurCapture, y.onBlurCapture),
    onPointerDownCapture: mn(e.onPointerDownCapture, C.onPointerDownCapture)
  }));
});
function Sh(e) {
  const t = Xt(e), n = A(!1), o = A(() => {
  });
  return j(() => {
    const r = (c) => {
      if (c.target && !n.current) {
        let i = function() {
          Ul(xh, t, s, {
            discrete: !0
          });
        };
        const s = {
          originalEvent: c
        };
        c.pointerType === "touch" ? (document.removeEventListener("click", o.current), o.current = i, document.addEventListener("click", o.current, {
          once: !0
        })) : i();
      }
      n.current = !1;
    }, a = window.setTimeout(() => {
      document.addEventListener("pointerdown", r);
    }, 0);
    return () => {
      window.clearTimeout(a), document.removeEventListener("pointerdown", r), document.removeEventListener("click", o.current);
    };
  }, [
    t
  ]), {
    // ensures we check React component tree (not just DOM tree)
    onPointerDownCapture: () => n.current = !0
  };
}
function Eh(e) {
  const t = Xt(e), n = A(!1);
  return j(() => {
    const o = (r) => {
      r.target && !n.current && Ul(wh, t, {
        originalEvent: r
      }, {
        discrete: !1
      });
    };
    return document.addEventListener("focusin", o), () => document.removeEventListener("focusin", o);
  }, [
    t
  ]), {
    onFocusCapture: () => n.current = !0,
    onBlurCapture: () => n.current = !1
  };
}
function Hs() {
  const e = new CustomEvent(Na);
  document.dispatchEvent(e);
}
function Ul(e, t, n, { discrete: o }) {
  const r = n.originalEvent.target, a = new CustomEvent(e, {
    bubbles: !1,
    cancelable: !0,
    detail: n
  });
  t && r.addEventListener(e, t, {
    once: !0
  }), o ? hh(r, a) : r.dispatchEvent(a);
}
const ca = "focusScope.autoFocusOnMount", sa = "focusScope.autoFocusOnUnmount", Bs = {
  bubbles: !1,
  cancelable: !0
}, Ph = /* @__PURE__ */ _((e, t) => {
  const { loop: n = !1, trapped: o = !1, onMountAutoFocus: r, onUnmountAutoFocus: a, ...c } = e, [s, i] = q(null), l = Xt(r), u = Xt(a), d = A(null), f = ho(
    t,
    (p) => i(p)
  ), m = A({
    paused: !1,
    pause() {
      this.paused = !0;
    },
    resume() {
      this.paused = !1;
    }
  }).current;
  j(() => {
    if (o) {
      let p = function(h) {
        if (m.paused || !s)
          return;
        const $ = h.target;
        s.contains($) ? d.current = $ : Kt(d.current, {
          select: !0
        });
      }, g = function(h) {
        m.paused || !s || s.contains(h.relatedTarget) || Kt(d.current, {
          select: !0
        });
      };
      return document.addEventListener("focusin", p), document.addEventListener("focusout", g), () => {
        document.removeEventListener("focusin", p), document.removeEventListener("focusout", g);
      };
    }
  }, [
    o,
    s,
    m.paused
  ]), j(() => {
    if (s) {
      Gs.add(m);
      const p = document.activeElement;
      if (!s.contains(p)) {
        const h = new CustomEvent(ca, Bs);
        s.addEventListener(ca, l), s.dispatchEvent(h), h.defaultPrevented || (_h(Mh(Wl(s)), {
          select: !0
        }), document.activeElement === p && Kt(s));
      }
      return () => {
        s.removeEventListener(ca, l), setTimeout(() => {
          const h = new CustomEvent(sa, Bs);
          s.addEventListener(sa, u), s.dispatchEvent(h), h.defaultPrevented || Kt(p ?? document.body, {
            select: !0
          }), s.removeEventListener(sa, u), Gs.remove(m);
        }, 0);
      };
    }
  }, [
    s,
    l,
    u,
    m
  ]);
  const b = re((p) => {
    if (!n && !o || m.paused)
      return;
    const g = p.key === "Tab" && !p.altKey && !p.ctrlKey && !p.metaKey, h = document.activeElement;
    if (g && h) {
      const $ = p.currentTarget, [x, C] = Th($);
      x && C ? !p.shiftKey && h === C ? (p.preventDefault(), n && Kt(x, {
        select: !0
      })) : p.shiftKey && h === x && (p.preventDefault(), n && Kt(C, {
        select: !0
      })) : h === $ && p.preventDefault();
    }
  }, [
    n,
    o,
    m.paused
  ]);
  return /* @__PURE__ */ v(Pr.div, S({
    tabIndex: -1
  }, c, {
    ref: f,
    onKeyDown: b
  }));
});
function _h(e, { select: t = !1 } = {}) {
  const n = document.activeElement;
  for (const o of e)
    if (Kt(o, {
      select: t
    }), document.activeElement !== n)
      return;
}
function Th(e) {
  const t = Wl(e), n = Ks(t, e), o = Ks(t.reverse(), e);
  return [
    n,
    o
  ];
}
function Wl(e) {
  const t = [], n = document.createTreeWalker(e, NodeFilter.SHOW_ELEMENT, {
    acceptNode: (o) => {
      const r = o.tagName === "INPUT" && o.type === "hidden";
      return o.disabled || o.hidden || r ? NodeFilter.FILTER_SKIP : o.tabIndex >= 0 ? NodeFilter.FILTER_ACCEPT : NodeFilter.FILTER_SKIP;
    }
  });
  for (; n.nextNode(); )
    t.push(n.currentNode);
  return t;
}
function Ks(e, t) {
  for (const n of e)
    if (!Nh(n, {
      upTo: t
    }))
      return n;
}
function Nh(e, { upTo: t }) {
  if (getComputedStyle(e).visibility === "hidden")
    return !0;
  for (; e; ) {
    if (t !== void 0 && e === t)
      return !1;
    if (getComputedStyle(e).display === "none")
      return !0;
    e = e.parentElement;
  }
  return !1;
}
function Rh(e) {
  return e instanceof HTMLInputElement && "select" in e;
}
function Kt(e, { select: t = !1 } = {}) {
  if (e && e.focus) {
    const n = document.activeElement;
    e.focus({
      preventScroll: !0
    }), e !== n && Rh(e) && t && e.select();
  }
}
const Gs = Ah();
function Ah() {
  let e = [];
  return {
    add(t) {
      const n = e[0];
      t !== n && (n == null || n.pause()), e = Us(e, t), e.unshift(t);
    },
    remove(t) {
      var n;
      e = Us(e, t), (n = e[0]) === null || n === void 0 || n.resume();
    }
  };
}
function Us(e, t) {
  const n = [
    ...e
  ], o = n.indexOf(t);
  return o !== -1 && n.splice(o, 1), n;
}
function Mh(e) {
  return e.filter(
    (t) => t.tagName !== "A"
  );
}
const Dh = /* @__PURE__ */ _((e, t) => {
  var n;
  const { container: o = globalThis == null || (n = globalThis.document) === null || n === void 0 ? void 0 : n.body, ...r } = e;
  return o ? /* @__PURE__ */ tc.createPortal(/* @__PURE__ */ v(Pr.div, S({}, r, {
    ref: t
  })), o) : null;
});
function Ih(e, t) {
  return ec((n, o) => {
    const r = t[n][o];
    return r ?? n;
  }, e);
}
const _r = (e) => {
  const { present: t, children: n } = e, o = Oh(t), r = typeof n == "function" ? n({
    present: o.isPresent
  }) : Ke.only(n), a = ho(o.ref, r.ref);
  return typeof n == "function" || o.isPresent ? /* @__PURE__ */ wn(r, {
    ref: a
  }) : null;
};
_r.displayName = "Presence";
function Oh(e) {
  const [t, n] = q(), o = A({}), r = A(e), a = A("none"), c = e ? "mounted" : "unmounted", [s, i] = Ih(c, {
    mounted: {
      UNMOUNT: "unmounted",
      ANIMATION_OUT: "unmountSuspended"
    },
    unmountSuspended: {
      MOUNT: "mounted",
      ANIMATION_END: "unmounted"
    },
    unmounted: {
      MOUNT: "mounted"
    }
  });
  return j(() => {
    const l = ko(o.current);
    a.current = s === "mounted" ? l : "none";
  }, [
    s
  ]), _a(() => {
    const l = o.current, u = r.current;
    if (u !== e) {
      const f = a.current, m = ko(l);
      e ? i("MOUNT") : m === "none" || (l == null ? void 0 : l.display) === "none" ? i("UNMOUNT") : i(u && f !== m ? "ANIMATION_OUT" : "UNMOUNT"), r.current = e;
    }
  }, [
    e,
    i
  ]), _a(() => {
    if (t) {
      const l = (d) => {
        const m = ko(o.current).includes(d.animationName);
        d.target === t && m && ur(
          () => i("ANIMATION_END")
        );
      }, u = (d) => {
        d.target === t && (a.current = ko(o.current));
      };
      return t.addEventListener("animationstart", u), t.addEventListener("animationcancel", l), t.addEventListener("animationend", l), () => {
        t.removeEventListener("animationstart", u), t.removeEventListener("animationcancel", l), t.removeEventListener("animationend", l);
      };
    } else
      i("ANIMATION_END");
  }, [
    t,
    i
  ]), {
    isPresent: [
      "mounted",
      "unmountSuspended"
    ].includes(s),
    ref: re((l) => {
      l && (o.current = getComputedStyle(l)), n(l);
    }, [])
  };
}
function ko(e) {
  return (e == null ? void 0 : e.animationName) || "none";
}
let ia = 0;
function kh() {
  j(() => {
    var e, t;
    const n = document.querySelectorAll("[data-radix-focus-guard]");
    return document.body.insertAdjacentElement("afterbegin", (e = n[0]) !== null && e !== void 0 ? e : Ws()), document.body.insertAdjacentElement("beforeend", (t = n[1]) !== null && t !== void 0 ? t : Ws()), ia++, () => {
      ia === 1 && document.querySelectorAll("[data-radix-focus-guard]").forEach(
        (o) => o.remove()
      ), ia--;
    };
  }, []);
}
function Ws() {
  const e = document.createElement("span");
  return e.setAttribute("data-radix-focus-guard", ""), e.tabIndex = 0, e.style.cssText = "outline: none; opacity: 0; position: fixed; pointer-events: none", e;
}
var jl = rl(), la = function() {
}, Tr = w.forwardRef(function(e, t) {
  var n = w.useRef(null), o = w.useState({
    onScrollCapture: la,
    onWheelCapture: la,
    onTouchMoveCapture: la
  }), r = o[0], a = o[1], c = e.forwardProps, s = e.children, i = e.className, l = e.removeScrollBar, u = e.enabled, d = e.shards, f = e.sideCar, m = e.noIsolation, b = e.inert, p = e.allowPinchZoom, g = e.as, h = g === void 0 ? "div" : g, $ = uc(e, ["forwardProps", "children", "className", "removeScrollBar", "enabled", "shards", "sideCar", "noIsolation", "inert", "allowPinchZoom", "as"]), x = f, C = ol([n, t]), y = Le(Le({}, $), r);
  return w.createElement(
    w.Fragment,
    null,
    u && w.createElement(x, { sideCar: jl, removeScrollBar: l, shards: d, noIsolation: m, inert: b, setCallbacks: a, allowPinchZoom: !!p, lockRef: n }),
    c ? w.cloneElement(w.Children.only(s), Le(Le({}, y), { ref: C })) : w.createElement(h, Le({}, y, { className: i, ref: C }), s)
  );
});
Tr.defaultProps = {
  enabled: !0,
  removeScrollBar: !0,
  inert: !1
};
Tr.classNames = {
  fullWidth: Wn,
  zeroRight: Un
};
var Ra = !1;
if (typeof window < "u")
  try {
    var Lo = Object.defineProperty({}, "passive", {
      get: function() {
        return Ra = !0, !0;
      }
    });
    window.addEventListener("test", Lo, Lo), window.removeEventListener("test", Lo, Lo);
  } catch {
    Ra = !1;
  }
var sn = Ra ? { passive: !1 } : !1, Lh = function(e) {
  var t = window.getComputedStyle(e);
  return t.overflowY !== "hidden" && // not-not-scrollable
  !(t.overflowY === t.overflowX && t.overflowY === "visible");
}, Fh = function(e) {
  var t = window.getComputedStyle(e);
  return t.overflowX !== "hidden" && // not-not-scrollable
  !(t.overflowY === t.overflowX && t.overflowX === "visible");
}, js = function(e, t) {
  var n = t;
  do {
    typeof ShadowRoot < "u" && n instanceof ShadowRoot && (n = n.host);
    var o = Yl(e, n);
    if (o) {
      var r = Xl(e, n), a = r[1], c = r[2];
      if (a > c)
        return !0;
    }
    n = n.parentNode;
  } while (n && n !== document.body);
  return !1;
}, zh = function(e) {
  var t = e.scrollTop, n = e.scrollHeight, o = e.clientHeight;
  return [
    t,
    n,
    o
  ];
}, Vh = function(e) {
  var t = e.scrollLeft, n = e.scrollWidth, o = e.clientWidth;
  return [
    t,
    n,
    o
  ];
}, Yl = function(e, t) {
  return e === "v" ? Lh(t) : Fh(t);
}, Xl = function(e, t) {
  return e === "v" ? zh(t) : Vh(t);
}, Hh = function(e, t) {
  return e === "h" && t === "rtl" ? -1 : 1;
}, Bh = function(e, t, n, o, r) {
  var a = Hh(e, window.getComputedStyle(t).direction), c = a * o, s = n.target, i = t.contains(s), l = !1, u = c > 0, d = 0, f = 0;
  do {
    var m = Xl(e, s), b = m[0], p = m[1], g = m[2], h = p - g - a * b;
    (b || h) && Yl(e, s) && (d += h, f += b), s = s.parentNode;
  } while (
    // portaled content
    !i && s !== document.body || // self content
    i && (t.contains(s) || t === s)
  );
  return (u && (r && d === 0 || !r && c > d) || !u && (r && f === 0 || !r && -c > f)) && (l = !0), l;
}, Fo = function(e) {
  return "changedTouches" in e ? [e.changedTouches[0].clientX, e.changedTouches[0].clientY] : [0, 0];
}, Ys = function(e) {
  return [e.deltaX, e.deltaY];
}, Xs = function(e) {
  return e && "current" in e ? e.current : e;
}, Kh = function(e, t) {
  return e[0] === t[0] && e[1] === t[1];
}, Gh = function(e) {
  return `
  .block-interactivity-`.concat(e, ` {pointer-events: none;}
  .allow-interactivity-`).concat(e, ` {pointer-events: all;}
`);
}, Uh = 0, ln = [];
function Wh(e) {
  var t = w.useRef([]), n = w.useRef([0, 0]), o = w.useRef(), r = w.useState(Uh++)[0], a = w.useState(function() {
    return fc();
  })[0], c = w.useRef(e);
  w.useEffect(function() {
    c.current = e;
  }, [e]), w.useEffect(function() {
    if (e.inert) {
      document.body.classList.add("block-interactivity-".concat(r));
      var p = nl([e.lockRef.current], (e.shards || []).map(Xs), !0).filter(Boolean);
      return p.forEach(function(g) {
        return g.classList.add("allow-interactivity-".concat(r));
      }), function() {
        document.body.classList.remove("block-interactivity-".concat(r)), p.forEach(function(g) {
          return g.classList.remove("allow-interactivity-".concat(r));
        });
      };
    }
  }, [e.inert, e.lockRef.current, e.shards]);
  var s = w.useCallback(function(p, g) {
    if ("touches" in p && p.touches.length === 2)
      return !c.current.allowPinchZoom;
    var h = Fo(p), $ = n.current, x = "deltaX" in p ? p.deltaX : $[0] - h[0], C = "deltaY" in p ? p.deltaY : $[1] - h[1], y, E = p.target, T = Math.abs(x) > Math.abs(C) ? "h" : "v";
    if ("touches" in p && T === "h" && E.type === "range")
      return !1;
    var R = js(T, E);
    if (!R)
      return !0;
    if (R ? y = T : (y = T === "v" ? "h" : "v", R = js(T, E)), !R)
      return !1;
    if (!o.current && "changedTouches" in p && (x || C) && (o.current = y), !y)
      return !0;
    var N = o.current || y;
    return Bh(N, g, p, N === "h" ? x : C, !0);
  }, []), i = w.useCallback(function(p) {
    var g = p;
    if (!(!ln.length || ln[ln.length - 1] !== a)) {
      var h = "deltaY" in g ? Ys(g) : Fo(g), $ = t.current.filter(function(y) {
        return y.name === g.type && y.target === g.target && Kh(y.delta, h);
      })[0];
      if ($ && $.should) {
        g.preventDefault();
        return;
      }
      if (!$) {
        var x = (c.current.shards || []).map(Xs).filter(Boolean).filter(function(y) {
          return y.contains(g.target);
        }), C = x.length > 0 ? s(g, x[0]) : !c.current.noIsolation;
        C && g.preventDefault();
      }
    }
  }, []), l = w.useCallback(function(p, g, h, $) {
    var x = { name: p, delta: g, target: h, should: $ };
    t.current.push(x), setTimeout(function() {
      t.current = t.current.filter(function(C) {
        return C !== x;
      });
    }, 1);
  }, []), u = w.useCallback(function(p) {
    n.current = Fo(p), o.current = void 0;
  }, []), d = w.useCallback(function(p) {
    l(p.type, Ys(p), p.target, s(p, e.lockRef.current));
  }, []), f = w.useCallback(function(p) {
    l(p.type, Fo(p), p.target, s(p, e.lockRef.current));
  }, []);
  w.useEffect(function() {
    return ln.push(a), e.setCallbacks({
      onScrollCapture: d,
      onWheelCapture: d,
      onTouchMoveCapture: f
    }), document.addEventListener("wheel", i, sn), document.addEventListener("touchmove", i, sn), document.addEventListener("touchstart", u, sn), function() {
      ln = ln.filter(function(p) {
        return p !== a;
      }), document.removeEventListener("wheel", i, sn), document.removeEventListener("touchmove", i, sn), document.removeEventListener("touchstart", u, sn);
    };
  }, []);
  var m = e.removeScrollBar, b = e.inert;
  return w.createElement(
    w.Fragment,
    null,
    b ? w.createElement(a, { styles: Gh(r) }) : null,
    m ? w.createElement(il, { gapMode: "margin" }) : null
  );
}
const jh = cl(jl, Wh);
var ql = w.forwardRef(function(e, t) {
  return w.createElement(Tr, Le({}, e, { ref: t, sideCar: jh }));
});
ql.classNames = Tr.classNames;
const Yh = ql, Zl = "Dialog", [Ql, K7] = ih(Zl), [Xh, en] = Ql(Zl), qh = (e) => {
  const { __scopeDialog: t, children: n, open: o, defaultOpen: r, onOpenChange: a, modal: c = !0 } = e, s = A(null), i = A(null), [l = !1, u] = fh({
    prop: o,
    defaultProp: r,
    onChange: a
  });
  return /* @__PURE__ */ v(Xh, {
    scope: t,
    triggerRef: s,
    contentRef: i,
    contentId: aa(),
    titleId: aa(),
    descriptionId: aa(),
    open: l,
    onOpenChange: u,
    onOpenToggle: re(
      () => u(
        (d) => !d
      ),
      [
        u
      ]
    ),
    modal: c
  }, n);
}, Jl = "DialogPortal", [Zh, ed] = Ql(Jl, {
  forceMount: void 0
}), Qh = (e) => {
  const { __scopeDialog: t, forceMount: n, children: o, container: r } = e, a = en(Jl, t);
  return /* @__PURE__ */ v(Zh, {
    scope: t,
    forceMount: n
  }, Ke.map(
    o,
    (c) => /* @__PURE__ */ v(_r, {
      present: n || a.open
    }, /* @__PURE__ */ v(Dh, {
      asChild: !0,
      container: r
    }, c))
  ));
}, Aa = "DialogOverlay", Jh = /* @__PURE__ */ _((e, t) => {
  const n = ed(Aa, e.__scopeDialog), { forceMount: o = n.forceMount, ...r } = e, a = en(Aa, e.__scopeDialog);
  return a.modal ? /* @__PURE__ */ v(_r, {
    present: o || a.open
  }, /* @__PURE__ */ v(e$, S({}, r, {
    ref: t
  }))) : null;
}), e$ = /* @__PURE__ */ _((e, t) => {
  const { __scopeDialog: n, ...o } = e, r = en(Aa, n);
  return (
    // Make sure `Content` is scrollable even when it doesn't live inside `RemoveScroll`
    // ie. when `Overlay` and `Content` are siblings
    /* @__PURE__ */ v(Yh, {
      as: wc,
      allowPinchZoom: !0,
      shards: [
        r.contentRef
      ]
    }, /* @__PURE__ */ v(Pr.div, S({
      "data-state": nd(r.open)
    }, o, {
      ref: t,
      style: {
        pointerEvents: "auto",
        ...o.style
      }
    })))
  );
}), Jn = "DialogContent", t$ = /* @__PURE__ */ _((e, t) => {
  const n = ed(Jn, e.__scopeDialog), { forceMount: o = n.forceMount, ...r } = e, a = en(Jn, e.__scopeDialog);
  return /* @__PURE__ */ v(_r, {
    present: o || a.open
  }, a.modal ? /* @__PURE__ */ v(n$, S({}, r, {
    ref: t
  })) : /* @__PURE__ */ v(o$, S({}, r, {
    ref: t
  })));
}), n$ = /* @__PURE__ */ _((e, t) => {
  const n = en(Jn, e.__scopeDialog), o = A(null), r = ho(t, n.contentRef, o);
  return j(() => {
    const a = o.current;
    if (a)
      return bo(a);
  }, []), /* @__PURE__ */ v(td, S({}, e, {
    ref: r,
    trapFocus: n.open,
    disableOutsidePointerEvents: !0,
    onCloseAutoFocus: mn(e.onCloseAutoFocus, (a) => {
      var c;
      a.preventDefault(), (c = n.triggerRef.current) === null || c === void 0 || c.focus();
    }),
    onPointerDownOutside: mn(e.onPointerDownOutside, (a) => {
      const c = a.detail.originalEvent, s = c.button === 0 && c.ctrlKey === !0;
      (c.button === 2 || s) && a.preventDefault();
    }),
    onFocusOutside: mn(
      e.onFocusOutside,
      (a) => a.preventDefault()
    )
  }));
}), o$ = /* @__PURE__ */ _((e, t) => {
  const n = en(Jn, e.__scopeDialog), o = A(!1);
  return /* @__PURE__ */ v(td, S({}, e, {
    ref: t,
    trapFocus: !1,
    disableOutsidePointerEvents: !1,
    onCloseAutoFocus: (r) => {
      var a;
      if ((a = e.onCloseAutoFocus) === null || a === void 0 || a.call(e, r), !r.defaultPrevented) {
        var c;
        o.current || (c = n.triggerRef.current) === null || c === void 0 || c.focus(), r.preventDefault();
      }
      o.current = !1;
    },
    onInteractOutside: (r) => {
      var a, c;
      (a = e.onInteractOutside) === null || a === void 0 || a.call(e, r), r.defaultPrevented || (o.current = !0);
      const s = r.target;
      ((c = n.triggerRef.current) === null || c === void 0 ? void 0 : c.contains(s)) && r.preventDefault();
    }
  }));
}), td = /* @__PURE__ */ _((e, t) => {
  const { __scopeDialog: n, trapFocus: o, onOpenAutoFocus: r, onCloseAutoFocus: a, ...c } = e, s = en(Jn, n), i = A(null), l = ho(t, i);
  return kh(), /* @__PURE__ */ v(Ge, null, /* @__PURE__ */ v(Ph, {
    asChild: !0,
    loop: !0,
    trapped: o,
    onMountAutoFocus: r,
    onUnmountAutoFocus: a
  }, /* @__PURE__ */ v(Ch, S({
    role: "dialog",
    id: s.contentId,
    "aria-describedby": s.descriptionId,
    "aria-labelledby": s.titleId,
    "data-state": nd(s.open)
  }, c, {
    ref: l,
    onDismiss: () => s.onOpenChange(!1)
  }))), !1);
});
function nd(e) {
  return e ? "open" : "closed";
}
const r$ = qh, a$ = Qh, c$ = Jh, s$ = t$;
var i$ = '[cmdk-list-sizer=""]', Vn = '[cmdk-group=""]', da = '[cmdk-group-items=""]', l$ = '[cmdk-group-heading=""]', yc = '[cmdk-item=""]', qs = `${yc}:not([aria-disabled="true"])`, Ma = "cmdk-item-select", bt = "data-value", d$ = (e, t) => ch(e, t), od = w.createContext(void 0), $o = () => w.useContext(od), rd = w.createContext(void 0), Cc = () => w.useContext(rd), ad = w.createContext(void 0), cd = w.forwardRef((e, t) => {
  let n = w.useRef(null), o = un(() => {
    var k, W, L;
    return { search: "", value: (L = (W = e.value) != null ? W : (k = e.defaultValue) == null ? void 0 : k.toLowerCase()) != null ? L : "", filtered: { count: 0, items: /* @__PURE__ */ new Map(), groups: /* @__PURE__ */ new Set() } };
  }), r = un(() => /* @__PURE__ */ new Set()), a = un(() => /* @__PURE__ */ new Map()), c = un(() => /* @__PURE__ */ new Map()), s = un(() => /* @__PURE__ */ new Set()), i = sd(e), { label: l, children: u, value: d, onValueChange: f, filter: m, shouldFilter: b, vimBindings: p = !0, ...g } = e, h = w.useId(), $ = w.useId(), x = w.useId(), C = w$();
  Tn(() => {
    if (d !== void 0) {
      let k = d.trim().toLowerCase();
      o.current.value = k, C(6, K), y.emit();
    }
  }, [d]);
  let y = w.useMemo(() => ({ subscribe: (k) => (s.current.add(k), () => s.current.delete(k)), snapshot: () => o.current, setState: (k, W, L) => {
    var z, X, ee;
    if (!Object.is(o.current[k], W)) {
      if (o.current[k] = W, k === "search")
        H(), R(), C(1, N);
      else if (k === "value")
        if (((z = i.current) == null ? void 0 : z.value) !== void 0) {
          let B = W ?? "";
          (ee = (X = i.current).onValueChange) == null || ee.call(X, B);
          return;
        } else
          L || C(5, K);
      y.emit();
    }
  }, emit: () => {
    s.current.forEach((k) => k());
  } }), []), E = w.useMemo(() => ({ value: (k, W) => {
    W !== c.current.get(k) && (c.current.set(k, W), o.current.filtered.items.set(k, T(W)), C(2, () => {
      R(), y.emit();
    }));
  }, item: (k, W) => (r.current.add(k), W && (a.current.has(W) ? a.current.get(W).add(k) : a.current.set(W, /* @__PURE__ */ new Set([k]))), C(3, () => {
    H(), R(), o.current.value || N(), y.emit();
  }), () => {
    c.current.delete(k), r.current.delete(k), o.current.filtered.items.delete(k);
    let L = I();
    C(4, () => {
      H(), (L == null ? void 0 : L.getAttribute("id")) === k && N(), y.emit();
    });
  }), group: (k) => (a.current.has(k) || a.current.set(k, /* @__PURE__ */ new Set()), () => {
    c.current.delete(k), a.current.delete(k);
  }), filter: () => i.current.shouldFilter, label: l || e["aria-label"], commandRef: n, listId: h, inputId: x, labelId: $ }), []);
  function T(k) {
    var W, L;
    let z = (L = (W = i.current) == null ? void 0 : W.filter) != null ? L : d$;
    return k ? z(k, o.current.search) : 0;
  }
  function R() {
    if (!n.current || !o.current.search || i.current.shouldFilter === !1)
      return;
    let k = o.current.filtered.items, W = [];
    o.current.filtered.groups.forEach((z) => {
      let X = a.current.get(z), ee = 0;
      X.forEach((B) => {
        let U = k.get(B);
        ee = Math.max(U, ee);
      }), W.push([z, ee]);
    });
    let L = n.current.querySelector(i$);
    Q().sort((z, X) => {
      var ee, B;
      let U = z.getAttribute(bt), te = X.getAttribute(bt);
      return ((ee = k.get(te)) != null ? ee : 0) - ((B = k.get(U)) != null ? B : 0);
    }).forEach((z) => {
      let X = z.closest(da);
      X ? X.appendChild(z.parentElement === X ? z : z.closest(`${da} > *`)) : L.appendChild(z.parentElement === L ? z : z.closest(`${da} > *`));
    }), W.sort((z, X) => X[1] - z[1]).forEach((z) => {
      let X = n.current.querySelector(`${Vn}[${bt}="${z[0]}"]`);
      X == null || X.parentElement.appendChild(X);
    });
  }
  function N() {
    let k = Q().find((L) => !L.ariaDisabled), W = k == null ? void 0 : k.getAttribute(bt);
    y.setState("value", W || void 0);
  }
  function H() {
    if (!o.current.search || i.current.shouldFilter === !1) {
      o.current.filtered.count = r.current.size;
      return;
    }
    o.current.filtered.groups = /* @__PURE__ */ new Set();
    let k = 0;
    for (let W of r.current) {
      let L = c.current.get(W), z = T(L);
      o.current.filtered.items.set(W, z), z > 0 && k++;
    }
    for (let [W, L] of a.current)
      for (let z of L)
        if (o.current.filtered.items.get(z) > 0) {
          o.current.filtered.groups.add(W);
          break;
        }
    o.current.filtered.count = k;
  }
  function K() {
    var k, W, L;
    let z = I();
    z && (((k = z.parentElement) == null ? void 0 : k.firstChild) === z && ((L = (W = z.closest(Vn)) == null ? void 0 : W.querySelector(l$)) == null || L.scrollIntoView({ block: "nearest" })), z.scrollIntoView({ block: "nearest" }));
  }
  function I() {
    var k;
    return (k = n.current) == null ? void 0 : k.querySelector(`${yc}[aria-selected="true"]`);
  }
  function Q() {
    return Array.from(n.current.querySelectorAll(qs));
  }
  function D(k) {
    let W = Q()[k];
    W && y.setState("value", W.getAttribute(bt));
  }
  function V(k) {
    var W;
    let L = I(), z = Q(), X = z.findIndex((B) => B === L), ee = z[X + k];
    (W = i.current) != null && W.loop && (ee = X + k < 0 ? z[z.length - 1] : X + k === z.length ? z[0] : z[X + k]), ee && y.setState("value", ee.getAttribute(bt));
  }
  function J(k) {
    let W = I(), L = W == null ? void 0 : W.closest(Vn), z;
    for (; L && !z; )
      L = k > 0 ? $$(L, Vn) : x$(L, Vn), z = L == null ? void 0 : L.querySelector(qs);
    z ? y.setState("value", z.getAttribute(bt)) : V(k);
  }
  let oe = () => D(Q().length - 1), se = (k) => {
    k.preventDefault(), k.metaKey ? oe() : k.altKey ? J(1) : V(1);
  }, Y = (k) => {
    k.preventDefault(), k.metaKey ? D(0) : k.altKey ? J(-1) : V(-1);
  };
  return w.createElement("div", { ref: xo([n, t]), ...g, "cmdk-root": "", onKeyDown: (k) => {
    var W;
    if ((W = g.onKeyDown) == null || W.call(g, k), !k.defaultPrevented)
      switch (k.key) {
        case "n":
        case "j": {
          p && k.ctrlKey && se(k);
          break;
        }
        case "ArrowDown": {
          se(k);
          break;
        }
        case "p":
        case "k": {
          p && k.ctrlKey && Y(k);
          break;
        }
        case "ArrowUp": {
          Y(k);
          break;
        }
        case "Home": {
          k.preventDefault(), D(0);
          break;
        }
        case "End": {
          k.preventDefault(), oe();
          break;
        }
        case "Enter":
          if (!k.nativeEvent.isComposing) {
            k.preventDefault();
            let L = I();
            if (L) {
              let z = new Event(Ma);
              L.dispatchEvent(z);
            }
          }
      }
  } }, w.createElement("label", { "cmdk-label": "", htmlFor: E.inputId, id: E.labelId, style: y$ }, l), w.createElement(rd.Provider, { value: y }, w.createElement(od.Provider, { value: E }, u)));
}), u$ = w.forwardRef((e, t) => {
  var n, o;
  let r = w.useId(), a = w.useRef(null), c = w.useContext(ad), s = $o(), i = sd(e), l = (o = (n = i.current) == null ? void 0 : n.forceMount) != null ? o : c == null ? void 0 : c.forceMount;
  Tn(() => s.item(r, c == null ? void 0 : c.id), []);
  let u = id(r, a, [e.value, e.children, a]), d = Cc(), f = qt((y) => y.value && y.value === u.current), m = qt((y) => l || s.filter() === !1 ? !0 : y.search ? y.filtered.items.get(r) > 0 : !0);
  w.useEffect(() => {
    let y = a.current;
    if (!(!y || e.disabled))
      return y.addEventListener(Ma, b), () => y.removeEventListener(Ma, b);
  }, [m, e.onSelect, e.disabled]);
  function b() {
    var y, E;
    p(), (E = (y = i.current).onSelect) == null || E.call(y, u.current);
  }
  function p() {
    d.setState("value", u.current, !0);
  }
  if (!m)
    return null;
  let { disabled: g, value: h, onSelect: $, forceMount: x, ...C } = e;
  return w.createElement("div", { ref: xo([a, t]), ...C, id: r, "cmdk-item": "", role: "option", "aria-disabled": g || void 0, "aria-selected": f || void 0, "data-disabled": g || void 0, "data-selected": f || void 0, onPointerMove: g ? void 0 : p, onClick: g ? void 0 : b }, e.children);
}), f$ = w.forwardRef((e, t) => {
  let { heading: n, children: o, forceMount: r, ...a } = e, c = w.useId(), s = w.useRef(null), i = w.useRef(null), l = w.useId(), u = $o(), d = qt((b) => r || u.filter() === !1 ? !0 : b.search ? b.filtered.groups.has(c) : !0);
  Tn(() => u.group(c), []), id(c, s, [e.value, e.heading, i]);
  let f = w.useMemo(() => ({ id: c, forceMount: r }), [r]), m = w.createElement(ad.Provider, { value: f }, o);
  return w.createElement("div", { ref: xo([s, t]), ...a, "cmdk-group": "", role: "presentation", hidden: d ? void 0 : !0 }, n && w.createElement("div", { ref: i, "cmdk-group-heading": "", "aria-hidden": !0, id: l }, n), w.createElement("div", { "cmdk-group-items": "", role: "group", "aria-labelledby": n ? l : void 0 }, m));
}), p$ = w.forwardRef((e, t) => {
  let { alwaysRender: n, ...o } = e, r = w.useRef(null), a = qt((c) => !c.search);
  return !n && !a ? null : w.createElement("div", { ref: xo([r, t]), ...o, "cmdk-separator": "", role: "separator" });
}), m$ = w.forwardRef((e, t) => {
  let { onValueChange: n, ...o } = e, r = e.value != null, a = Cc(), c = qt((u) => u.search), s = qt((u) => u.value), i = $o(), l = w.useMemo(() => {
    var u;
    let d = (u = i.commandRef.current) == null ? void 0 : u.querySelector(`${yc}[${bt}="${s}"]`);
    return d == null ? void 0 : d.getAttribute("id");
  }, [s, i.commandRef]);
  return w.useEffect(() => {
    e.value != null && a.setState("search", e.value);
  }, [e.value]), w.createElement("input", { ref: t, ...o, "cmdk-input": "", autoComplete: "off", autoCorrect: "off", spellCheck: !1, "aria-autocomplete": "list", role: "combobox", "aria-expanded": !0, "aria-controls": i.listId, "aria-labelledby": i.labelId, "aria-activedescendant": l, id: i.inputId, type: "text", value: r ? e.value : c, onChange: (u) => {
    r || a.setState("search", u.target.value), n == null || n(u.target.value);
  } });
}), b$ = w.forwardRef((e, t) => {
  let { children: n, ...o } = e, r = w.useRef(null), a = w.useRef(null), c = $o();
  return w.useEffect(() => {
    if (a.current && r.current) {
      let s = a.current, i = r.current, l, u = new ResizeObserver(() => {
        l = requestAnimationFrame(() => {
          let d = s.offsetHeight;
          i.style.setProperty("--cmdk-list-height", d.toFixed(1) + "px");
        });
      });
      return u.observe(s), () => {
        cancelAnimationFrame(l), u.unobserve(s);
      };
    }
  }, []), w.createElement("div", { ref: xo([r, t]), ...o, "cmdk-list": "", role: "listbox", "aria-label": "Suggestions", id: c.listId, "aria-labelledby": c.inputId }, w.createElement("div", { ref: a, "cmdk-list-sizer": "" }, n));
}), v$ = w.forwardRef((e, t) => {
  let { open: n, onOpenChange: o, overlayClassName: r, contentClassName: a, container: c, ...s } = e;
  return w.createElement(r$, { open: n, onOpenChange: o }, w.createElement(a$, { container: c }, w.createElement(c$, { "cmdk-overlay": "", className: r }), w.createElement(s$, { "aria-label": e.label, "cmdk-dialog": "", className: a }, w.createElement(cd, { ref: t, ...s }))));
}), g$ = w.forwardRef((e, t) => {
  let n = w.useRef(!0), o = qt((r) => r.filtered.count === 0);
  return w.useEffect(() => {
    n.current = !1;
  }, []), n.current || !o ? null : w.createElement("div", { ref: t, ...e, "cmdk-empty": "", role: "presentation" });
}), h$ = w.forwardRef((e, t) => {
  let { progress: n, children: o, ...r } = e;
  return w.createElement("div", { ref: t, ...r, "cmdk-loading": "", role: "progressbar", "aria-valuenow": n, "aria-valuemin": 0, "aria-valuemax": 100, "aria-label": "Loading..." }, w.createElement("div", { "aria-hidden": !0 }, o));
}), Ue = Object.assign(cd, { List: b$, Item: u$, Input: m$, Group: f$, Separator: p$, Dialog: v$, Empty: g$, Loading: h$ });
function $$(e, t) {
  let n = e.nextElementSibling;
  for (; n; ) {
    if (n.matches(t))
      return n;
    n = n.nextElementSibling;
  }
}
function x$(e, t) {
  let n = e.previousElementSibling;
  for (; n; ) {
    if (n.matches(t))
      return n;
    n = n.previousElementSibling;
  }
}
function sd(e) {
  let t = w.useRef(e);
  return Tn(() => {
    t.current = e;
  }), t;
}
var Tn = typeof window > "u" ? w.useEffect : w.useLayoutEffect;
function un(e) {
  let t = w.useRef();
  return t.current === void 0 && (t.current = e()), t;
}
function xo(e) {
  return (t) => {
    e.forEach((n) => {
      typeof n == "function" ? n(t) : n != null && (n.current = t);
    });
  };
}
function qt(e) {
  let t = Cc(), n = () => e(t.snapshot());
  return w.useSyncExternalStore(t.subscribe, n, n);
}
function id(e, t, n) {
  let o = w.useRef(), r = $o();
  return Tn(() => {
    var a;
    let c = (() => {
      var s;
      for (let i of n) {
        if (typeof i == "string")
          return i.trim().toLowerCase();
        if (typeof i == "object" && "current" in i)
          return i.current ? (s = i.current.textContent) == null ? void 0 : s.trim().toLowerCase() : o.current;
      }
    })();
    r.value(e, c), (a = t.current) == null || a.setAttribute(bt, c), o.current = c;
  }), o;
}
var w$ = () => {
  let [e, t] = w.useState(), n = un(() => /* @__PURE__ */ new Map());
  return Tn(() => {
    n.current.forEach((o) => o()), n.current = /* @__PURE__ */ new Map();
  }, [e]), (o, r) => {
    n.current.set(o, r), t({});
  };
}, y$ = { position: "absolute", width: "1px", height: "1px", padding: "0", margin: "-1px", overflow: "hidden", clip: "rect(0, 0, 0, 0)", whiteSpace: "nowrap", borderWidth: "0" };
const C$ = wr, G7 = yr, S$ = Cr, U7 = Jt, ld = w.forwardRef(({ className: e, ...t }, n) => /* @__PURE__ */ P(
  Cn,
  {
    ref: n,
    className: M(
      "fixed inset-0 z-50 bg-background/80 backdrop-blur-sm data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0",
      e
    ),
    ...t
  }
));
ld.displayName = Cn.displayName;
const dd = w.forwardRef(({ className: e, children: t, ...n }, o) => /* @__PURE__ */ ve(S$, { children: [
  /* @__PURE__ */ P(ld, {}),
  /* @__PURE__ */ ve(
    Sn,
    {
      ref: o,
      className: M(
        "fixed left-[50%] top-[50%] z-50 grid w-full max-w-lg translate-x-[-50%] translate-y-[-50%] gap-4 border bg-background p-6 shadow-lg duration-200 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[state=closed]:slide-out-to-left-1/2 data-[state=closed]:slide-out-to-top-[48%] data-[state=open]:slide-in-from-left-1/2 data-[state=open]:slide-in-from-top-[48%] sm:rounded-lg",
        e
      ),
      ...n,
      children: [
        t,
        /* @__PURE__ */ ve(
          Jt,
          {
            className: "absolute right-4 top-4 rounded-sm opacity-70 ring-offset-background transition-opacity hover:opacity-100 focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:pointer-events-none data-[state=open]:bg-accent data-[state=open]:text-muted-foreground",
            children: [
              /* @__PURE__ */ P(lc, { className: "h-4 w-4" }),
              /* @__PURE__ */ P("span", { className: "sr-only", children: "Close" })
            ]
          }
        )
      ]
    }
  )
] }));
dd.displayName = Sn.displayName;
function E$({
  className: e,
  ...t
}) {
  return /* @__PURE__ */ P(
    "div",
    {
      className: M("flex flex-col space-y-1.5 text-center sm:text-left", e),
      ...t
    }
  );
}
E$.displayName = "DialogHeader";
function P$({
  className: e,
  ...t
}) {
  return /* @__PURE__ */ P(
    "div",
    {
      className: M("flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2", e),
      ...t
    }
  );
}
P$.displayName = "DialogFooter";
const _$ = w.forwardRef(({ className: e, ...t }, n) => /* @__PURE__ */ P(
  En,
  {
    ref: n,
    className: M("text-lg font-semibold leading-none tracking-tight", e),
    ...t
  }
));
_$.displayName = En.displayName;
const T$ = w.forwardRef(({ className: e, ...t }, n) => /* @__PURE__ */ P(
  Pn,
  {
    ref: n,
    className: M("text-sm text-muted-foreground", e),
    ...t
  }
));
T$.displayName = Pn.displayName;
const ud = w.forwardRef(({ className: e, ...t }, n) => /* @__PURE__ */ P(
  Ue,
  {
    ref: n,
    className: M(
      "flex h-full w-full flex-col overflow-hidden rounded-md bg-popover text-popover-foreground",
      e
    ),
    ...t
  }
));
ud.displayName = Ue.displayName;
function W7({
  children: e,
  ...t
}) {
  return /* @__PURE__ */ P(C$, { ...t, children: /* @__PURE__ */ P(dd, { className: "overflow-hidden p-0 shadow-lg", children: /* @__PURE__ */ P(
    ud,
    {
      className: "[&_[cmdk-group-heading]]:px-2 [&_[cmdk-group-heading]]:font-medium [&_[cmdk-group-heading]]:text-muted-foreground [&_[cmdk-group]:not([hidden])_~[cmdk-group]]:pt-0 [&_[cmdk-group]]:px-2 [&_[cmdk-input-wrapper]_svg]:h-5 [&_[cmdk-input-wrapper]_svg]:w-5 [&_[cmdk-input]]:h-12 [&_[cmdk-item]]:px-2 [&_[cmdk-item]]:py-3 [&_[cmdk-item]_svg]:h-5 [&_[cmdk-item]_svg]:w-5",
      children: e
    }
  ) }) });
}
const N$ = w.forwardRef(({ className: e, ...t }, n) => /* @__PURE__ */ ve("div", { className: "flex items-center border-b px-3", "cmdk-input-wrapper": "", children: [
  /* @__PURE__ */ P(bb, { className: "mr-2 h-4 w-4 shrink-0 opacity-50" }),
  /* @__PURE__ */ P(
    Ue.Input,
    {
      ref: n,
      className: M(
        "flex h-11 w-full rounded-md bg-transparent py-3 text-sm outline-none placeholder:text-muted-foreground disabled:cursor-not-allowed disabled:opacity-50",
        e
      ),
      ...t
    }
  )
] }));
N$.displayName = Ue.Input.displayName;
const R$ = w.forwardRef(({ className: e, ...t }, n) => /* @__PURE__ */ P(
  Ue.List,
  {
    ref: n,
    className: M("max-h-[300px] overflow-y-auto overflow-x-hidden", e),
    ...t
  }
));
R$.displayName = Ue.List.displayName;
const A$ = w.forwardRef((e, t) => /* @__PURE__ */ P(Ue.Empty, { ref: t, className: "py-6 text-center text-sm", ...e }));
A$.displayName = Ue.Empty.displayName;
const M$ = w.forwardRef(({ className: e, ...t }, n) => /* @__PURE__ */ P(
  Ue.Group,
  {
    ref: n,
    className: M(
      "overflow-hidden p-1 text-foreground [&_[cmdk-group-heading]]:px-2 [&_[cmdk-group-heading]]:py-1.5 [&_[cmdk-group-heading]]:text-xs [&_[cmdk-group-heading]]:font-medium [&_[cmdk-group-heading]]:text-muted-foreground",
      e
    ),
    ...t
  }
));
M$.displayName = Ue.Group.displayName;
const D$ = w.forwardRef(({ className: e, ...t }, n) => /* @__PURE__ */ P(Ue.Separator, { ref: n, className: M("-mx-1 h-px bg-border", e), ...t }));
D$.displayName = Ue.Separator.displayName;
const I$ = w.forwardRef(({ className: e, ...t }, n) => /* @__PURE__ */ P(
  Ue.Item,
  {
    ref: n,
    className: M(
      "relative flex cursor-default select-none items-center rounded-sm px-2 py-1.5 text-sm outline-none aria-selected:bg-accent aria-selected:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",
      e
    ),
    ...t
  }
));
I$.displayName = Ue.Item.displayName;
function O$({
  className: e,
  ...t
}) {
  return /* @__PURE__ */ P(
    "span",
    {
      className: M("ml-auto text-xs tracking-widest text-muted-foreground", e),
      ...t
    }
  );
}
O$.displayName = "CommandShortcut";
const k$ = ["top", "right", "bottom", "left"], At = Math.min, Ye = Math.max, Jo = Math.round, zo = Math.floor, Mt = (e) => ({
  x: e,
  y: e
}), L$ = {
  left: "right",
  right: "left",
  bottom: "top",
  top: "bottom"
}, F$ = {
  start: "end",
  end: "start"
};
function Da(e, t, n) {
  return Ye(e, At(t, n));
}
function ht(e, t) {
  return typeof e == "function" ? e(t) : e;
}
function $t(e) {
  return e.split("-")[0];
}
function Nn(e) {
  return e.split("-")[1];
}
function Sc(e) {
  return e === "x" ? "y" : "x";
}
function Ec(e) {
  return e === "y" ? "height" : "width";
}
function Rn(e) {
  return ["top", "bottom"].includes($t(e)) ? "y" : "x";
}
function Pc(e) {
  return Sc(Rn(e));
}
function z$(e, t, n) {
  n === void 0 && (n = !1);
  const o = Nn(e), r = Pc(e), a = Ec(r);
  let c = r === "x" ? o === (n ? "end" : "start") ? "right" : "left" : o === "start" ? "bottom" : "top";
  return t.reference[a] > t.floating[a] && (c = er(c)), [c, er(c)];
}
function V$(e) {
  const t = er(e);
  return [Ia(e), t, Ia(t)];
}
function Ia(e) {
  return e.replace(/start|end/g, (t) => F$[t]);
}
function H$(e, t, n) {
  const o = ["left", "right"], r = ["right", "left"], a = ["top", "bottom"], c = ["bottom", "top"];
  switch (e) {
    case "top":
    case "bottom":
      return n ? t ? r : o : t ? o : r;
    case "left":
    case "right":
      return t ? a : c;
    default:
      return [];
  }
}
function B$(e, t, n, o) {
  const r = Nn(e);
  let a = H$($t(e), n === "start", o);
  return r && (a = a.map((c) => c + "-" + r), t && (a = a.concat(a.map(Ia)))), a;
}
function er(e) {
  return e.replace(/left|right|bottom|top/g, (t) => L$[t]);
}
function K$(e) {
  return {
    top: 0,
    right: 0,
    bottom: 0,
    left: 0,
    ...e
  };
}
function fd(e) {
  return typeof e != "number" ? K$(e) : {
    top: e,
    right: e,
    bottom: e,
    left: e
  };
}
function tr(e) {
  return {
    ...e,
    top: e.y,
    left: e.x,
    right: e.x + e.width,
    bottom: e.y + e.height
  };
}
function Zs(e, t, n) {
  let {
    reference: o,
    floating: r
  } = e;
  const a = Rn(t), c = Pc(t), s = Ec(c), i = $t(t), l = a === "y", u = o.x + o.width / 2 - r.width / 2, d = o.y + o.height / 2 - r.height / 2, f = o[s] / 2 - r[s] / 2;
  let m;
  switch (i) {
    case "top":
      m = {
        x: u,
        y: o.y - r.height
      };
      break;
    case "bottom":
      m = {
        x: u,
        y: o.y + o.height
      };
      break;
    case "right":
      m = {
        x: o.x + o.width,
        y: d
      };
      break;
    case "left":
      m = {
        x: o.x - r.width,
        y: d
      };
      break;
    default:
      m = {
        x: o.x,
        y: o.y
      };
  }
  switch (Nn(t)) {
    case "start":
      m[c] -= f * (n && l ? -1 : 1);
      break;
    case "end":
      m[c] += f * (n && l ? -1 : 1);
      break;
  }
  return m;
}
const G$ = async (e, t, n) => {
  const {
    placement: o = "bottom",
    strategy: r = "absolute",
    middleware: a = [],
    platform: c
  } = n, s = a.filter(Boolean), i = await (c.isRTL == null ? void 0 : c.isRTL(t));
  let l = await c.getElementRects({
    reference: e,
    floating: t,
    strategy: r
  }), {
    x: u,
    y: d
  } = Zs(l, o, i), f = o, m = {}, b = 0;
  for (let p = 0; p < s.length; p++) {
    const {
      name: g,
      fn: h
    } = s[p], {
      x: $,
      y: x,
      data: C,
      reset: y
    } = await h({
      x: u,
      y: d,
      initialPlacement: o,
      placement: f,
      strategy: r,
      middlewareData: m,
      rects: l,
      platform: c,
      elements: {
        reference: e,
        floating: t
      }
    });
    u = $ ?? u, d = x ?? d, m = {
      ...m,
      [g]: {
        ...m[g],
        ...C
      }
    }, y && b <= 50 && (b++, typeof y == "object" && (y.placement && (f = y.placement), y.rects && (l = y.rects === !0 ? await c.getElementRects({
      reference: e,
      floating: t,
      strategy: r
    }) : y.rects), {
      x: u,
      y: d
    } = Zs(l, f, i)), p = -1);
  }
  return {
    x: u,
    y: d,
    placement: f,
    strategy: r,
    middlewareData: m
  };
};
async function eo(e, t) {
  var n;
  t === void 0 && (t = {});
  const {
    x: o,
    y: r,
    platform: a,
    rects: c,
    elements: s,
    strategy: i
  } = e, {
    boundary: l = "clippingAncestors",
    rootBoundary: u = "viewport",
    elementContext: d = "floating",
    altBoundary: f = !1,
    padding: m = 0
  } = ht(t, e), b = fd(m), g = s[f ? d === "floating" ? "reference" : "floating" : d], h = tr(await a.getClippingRect({
    element: (n = await (a.isElement == null ? void 0 : a.isElement(g))) == null || n ? g : g.contextElement || await (a.getDocumentElement == null ? void 0 : a.getDocumentElement(s.floating)),
    boundary: l,
    rootBoundary: u,
    strategy: i
  })), $ = d === "floating" ? {
    ...c.floating,
    x: o,
    y: r
  } : c.reference, x = await (a.getOffsetParent == null ? void 0 : a.getOffsetParent(s.floating)), C = await (a.isElement == null ? void 0 : a.isElement(x)) ? await (a.getScale == null ? void 0 : a.getScale(x)) || {
    x: 1,
    y: 1
  } : {
    x: 1,
    y: 1
  }, y = tr(a.convertOffsetParentRelativeRectToViewportRelativeRect ? await a.convertOffsetParentRelativeRectToViewportRelativeRect({
    elements: s,
    rect: $,
    offsetParent: x,
    strategy: i
  }) : $);
  return {
    top: (h.top - y.top + b.top) / C.y,
    bottom: (y.bottom - h.bottom + b.bottom) / C.y,
    left: (h.left - y.left + b.left) / C.x,
    right: (y.right - h.right + b.right) / C.x
  };
}
const U$ = (e) => ({
  name: "arrow",
  options: e,
  async fn(t) {
    const {
      x: n,
      y: o,
      placement: r,
      rects: a,
      platform: c,
      elements: s,
      middlewareData: i
    } = t, {
      element: l,
      padding: u = 0
    } = ht(e, t) || {};
    if (l == null)
      return {};
    const d = fd(u), f = {
      x: n,
      y: o
    }, m = Pc(r), b = Ec(m), p = await c.getDimensions(l), g = m === "y", h = g ? "top" : "left", $ = g ? "bottom" : "right", x = g ? "clientHeight" : "clientWidth", C = a.reference[b] + a.reference[m] - f[m] - a.floating[b], y = f[m] - a.reference[m], E = await (c.getOffsetParent == null ? void 0 : c.getOffsetParent(l));
    let T = E ? E[x] : 0;
    (!T || !await (c.isElement == null ? void 0 : c.isElement(E))) && (T = s.floating[x] || a.floating[b]);
    const R = C / 2 - y / 2, N = T / 2 - p[b] / 2 - 1, H = At(d[h], N), K = At(d[$], N), I = H, Q = T - p[b] - K, D = T / 2 - p[b] / 2 + R, V = Da(I, D, Q), J = !i.arrow && Nn(r) != null && D !== V && a.reference[b] / 2 - (D < I ? H : K) - p[b] / 2 < 0, oe = J ? D < I ? D - I : D - Q : 0;
    return {
      [m]: f[m] + oe,
      data: {
        [m]: V,
        centerOffset: D - V - oe,
        ...J && {
          alignmentOffset: oe
        }
      },
      reset: J
    };
  }
}), W$ = function(e) {
  return e === void 0 && (e = {}), {
    name: "flip",
    options: e,
    async fn(t) {
      var n, o;
      const {
        placement: r,
        middlewareData: a,
        rects: c,
        initialPlacement: s,
        platform: i,
        elements: l
      } = t, {
        mainAxis: u = !0,
        crossAxis: d = !0,
        fallbackPlacements: f,
        fallbackStrategy: m = "bestFit",
        fallbackAxisSideDirection: b = "none",
        flipAlignment: p = !0,
        ...g
      } = ht(e, t);
      if ((n = a.arrow) != null && n.alignmentOffset)
        return {};
      const h = $t(r), $ = $t(s) === s, x = await (i.isRTL == null ? void 0 : i.isRTL(l.floating)), C = f || ($ || !p ? [er(s)] : V$(s));
      !f && b !== "none" && C.push(...B$(s, p, b, x));
      const y = [s, ...C], E = await eo(t, g), T = [];
      let R = ((o = a.flip) == null ? void 0 : o.overflows) || [];
      if (u && T.push(E[h]), d) {
        const I = z$(r, c, x);
        T.push(E[I[0]], E[I[1]]);
      }
      if (R = [...R, {
        placement: r,
        overflows: T
      }], !T.every((I) => I <= 0)) {
        var N, H;
        const I = (((N = a.flip) == null ? void 0 : N.index) || 0) + 1, Q = y[I];
        if (Q)
          return {
            data: {
              index: I,
              overflows: R
            },
            reset: {
              placement: Q
            }
          };
        let D = (H = R.filter((V) => V.overflows[0] <= 0).sort((V, J) => V.overflows[1] - J.overflows[1])[0]) == null ? void 0 : H.placement;
        if (!D)
          switch (m) {
            case "bestFit": {
              var K;
              const V = (K = R.map((J) => [J.placement, J.overflows.filter((oe) => oe > 0).reduce((oe, se) => oe + se, 0)]).sort((J, oe) => J[1] - oe[1])[0]) == null ? void 0 : K[0];
              V && (D = V);
              break;
            }
            case "initialPlacement":
              D = s;
              break;
          }
        if (r !== D)
          return {
            reset: {
              placement: D
            }
          };
      }
      return {};
    }
  };
};
function Qs(e, t) {
  return {
    top: e.top - t.height,
    right: e.right - t.width,
    bottom: e.bottom - t.height,
    left: e.left - t.width
  };
}
function Js(e) {
  return k$.some((t) => e[t] >= 0);
}
const j$ = function(e) {
  return e === void 0 && (e = {}), {
    name: "hide",
    options: e,
    async fn(t) {
      const {
        rects: n
      } = t, {
        strategy: o = "referenceHidden",
        ...r
      } = ht(e, t);
      switch (o) {
        case "referenceHidden": {
          const a = await eo(t, {
            ...r,
            elementContext: "reference"
          }), c = Qs(a, n.reference);
          return {
            data: {
              referenceHiddenOffsets: c,
              referenceHidden: Js(c)
            }
          };
        }
        case "escaped": {
          const a = await eo(t, {
            ...r,
            altBoundary: !0
          }), c = Qs(a, n.floating);
          return {
            data: {
              escapedOffsets: c,
              escaped: Js(c)
            }
          };
        }
        default:
          return {};
      }
    }
  };
};
async function Y$(e, t) {
  const {
    placement: n,
    platform: o,
    elements: r
  } = e, a = await (o.isRTL == null ? void 0 : o.isRTL(r.floating)), c = $t(n), s = Nn(n), i = Rn(n) === "y", l = ["left", "top"].includes(c) ? -1 : 1, u = a && i ? -1 : 1, d = ht(t, e);
  let {
    mainAxis: f,
    crossAxis: m,
    alignmentAxis: b
  } = typeof d == "number" ? {
    mainAxis: d,
    crossAxis: 0,
    alignmentAxis: null
  } : {
    mainAxis: 0,
    crossAxis: 0,
    alignmentAxis: null,
    ...d
  };
  return s && typeof b == "number" && (m = s === "end" ? b * -1 : b), i ? {
    x: m * u,
    y: f * l
  } : {
    x: f * l,
    y: m * u
  };
}
const X$ = function(e) {
  return e === void 0 && (e = 0), {
    name: "offset",
    options: e,
    async fn(t) {
      var n, o;
      const {
        x: r,
        y: a,
        placement: c,
        middlewareData: s
      } = t, i = await Y$(t, e);
      return c === ((n = s.offset) == null ? void 0 : n.placement) && (o = s.arrow) != null && o.alignmentOffset ? {} : {
        x: r + i.x,
        y: a + i.y,
        data: {
          ...i,
          placement: c
        }
      };
    }
  };
}, q$ = function(e) {
  return e === void 0 && (e = {}), {
    name: "shift",
    options: e,
    async fn(t) {
      const {
        x: n,
        y: o,
        placement: r
      } = t, {
        mainAxis: a = !0,
        crossAxis: c = !1,
        limiter: s = {
          fn: (g) => {
            let {
              x: h,
              y: $
            } = g;
            return {
              x: h,
              y: $
            };
          }
        },
        ...i
      } = ht(e, t), l = {
        x: n,
        y: o
      }, u = await eo(t, i), d = Rn($t(r)), f = Sc(d);
      let m = l[f], b = l[d];
      if (a) {
        const g = f === "y" ? "top" : "left", h = f === "y" ? "bottom" : "right", $ = m + u[g], x = m - u[h];
        m = Da($, m, x);
      }
      if (c) {
        const g = d === "y" ? "top" : "left", h = d === "y" ? "bottom" : "right", $ = b + u[g], x = b - u[h];
        b = Da($, b, x);
      }
      const p = s.fn({
        ...t,
        [f]: m,
        [d]: b
      });
      return {
        ...p,
        data: {
          x: p.x - n,
          y: p.y - o
        }
      };
    }
  };
}, Z$ = function(e) {
  return e === void 0 && (e = {}), {
    options: e,
    fn(t) {
      const {
        x: n,
        y: o,
        placement: r,
        rects: a,
        middlewareData: c
      } = t, {
        offset: s = 0,
        mainAxis: i = !0,
        crossAxis: l = !0
      } = ht(e, t), u = {
        x: n,
        y: o
      }, d = Rn(r), f = Sc(d);
      let m = u[f], b = u[d];
      const p = ht(s, t), g = typeof p == "number" ? {
        mainAxis: p,
        crossAxis: 0
      } : {
        mainAxis: 0,
        crossAxis: 0,
        ...p
      };
      if (i) {
        const x = f === "y" ? "height" : "width", C = a.reference[f] - a.floating[x] + g.mainAxis, y = a.reference[f] + a.reference[x] - g.mainAxis;
        m < C ? m = C : m > y && (m = y);
      }
      if (l) {
        var h, $;
        const x = f === "y" ? "width" : "height", C = ["top", "left"].includes($t(r)), y = a.reference[d] - a.floating[x] + (C && ((h = c.offset) == null ? void 0 : h[d]) || 0) + (C ? 0 : g.crossAxis), E = a.reference[d] + a.reference[x] + (C ? 0 : (($ = c.offset) == null ? void 0 : $[d]) || 0) - (C ? g.crossAxis : 0);
        b < y ? b = y : b > E && (b = E);
      }
      return {
        [f]: m,
        [d]: b
      };
    }
  };
}, Q$ = function(e) {
  return e === void 0 && (e = {}), {
    name: "size",
    options: e,
    async fn(t) {
      const {
        placement: n,
        rects: o,
        platform: r,
        elements: a
      } = t, {
        apply: c = () => {
        },
        ...s
      } = ht(e, t), i = await eo(t, s), l = $t(n), u = Nn(n), d = Rn(n) === "y", {
        width: f,
        height: m
      } = o.floating;
      let b, p;
      l === "top" || l === "bottom" ? (b = l, p = u === (await (r.isRTL == null ? void 0 : r.isRTL(a.floating)) ? "start" : "end") ? "left" : "right") : (p = l, b = u === "end" ? "top" : "bottom");
      const g = m - i[b], h = f - i[p], $ = !t.middlewareData.shift;
      let x = g, C = h;
      if (d) {
        const E = f - i.left - i.right;
        C = u || $ ? At(h, E) : E;
      } else {
        const E = m - i.top - i.bottom;
        x = u || $ ? At(g, E) : E;
      }
      if ($ && !u) {
        const E = Ye(i.left, 0), T = Ye(i.right, 0), R = Ye(i.top, 0), N = Ye(i.bottom, 0);
        d ? C = f - 2 * (E !== 0 || T !== 0 ? E + T : Ye(i.left, i.right)) : x = m - 2 * (R !== 0 || N !== 0 ? R + N : Ye(i.top, i.bottom));
      }
      await c({
        ...t,
        availableWidth: C,
        availableHeight: x
      });
      const y = await r.getDimensions(a.floating);
      return f !== y.width || m !== y.height ? {
        reset: {
          rects: !0
        }
      } : {};
    }
  };
};
function Dt(e) {
  return pd(e) ? (e.nodeName || "").toLowerCase() : "#document";
}
function Xe(e) {
  var t;
  return (e == null || (t = e.ownerDocument) == null ? void 0 : t.defaultView) || window;
}
function Ct(e) {
  var t;
  return (t = (pd(e) ? e.ownerDocument : e.document) || window.document) == null ? void 0 : t.documentElement;
}
function pd(e) {
  return e instanceof Node || e instanceof Xe(e).Node;
}
function xt(e) {
  return e instanceof Element || e instanceof Xe(e).Element;
}
function it(e) {
  return e instanceof HTMLElement || e instanceof Xe(e).HTMLElement;
}
function ei(e) {
  return typeof ShadowRoot > "u" ? !1 : e instanceof ShadowRoot || e instanceof Xe(e).ShadowRoot;
}
function wo(e) {
  const {
    overflow: t,
    overflowX: n,
    overflowY: o,
    display: r
  } = Ze(e);
  return /auto|scroll|overlay|hidden|clip/.test(t + o + n) && !["inline", "contents"].includes(r);
}
function J$(e) {
  return ["table", "td", "th"].includes(Dt(e));
}
function _c(e) {
  const t = Tc(), n = Ze(e);
  return n.transform !== "none" || n.perspective !== "none" || (n.containerType ? n.containerType !== "normal" : !1) || !t && (n.backdropFilter ? n.backdropFilter !== "none" : !1) || !t && (n.filter ? n.filter !== "none" : !1) || ["transform", "perspective", "filter"].some((o) => (n.willChange || "").includes(o)) || ["paint", "layout", "strict", "content"].some((o) => (n.contain || "").includes(o));
}
function e1(e) {
  let t = gn(e);
  for (; it(t) && !Nr(t); ) {
    if (_c(t))
      return t;
    t = gn(t);
  }
  return null;
}
function Tc() {
  return typeof CSS > "u" || !CSS.supports ? !1 : CSS.supports("-webkit-backdrop-filter", "none");
}
function Nr(e) {
  return ["html", "body", "#document"].includes(Dt(e));
}
function Ze(e) {
  return Xe(e).getComputedStyle(e);
}
function Rr(e) {
  return xt(e) ? {
    scrollLeft: e.scrollLeft,
    scrollTop: e.scrollTop
  } : {
    scrollLeft: e.pageXOffset,
    scrollTop: e.pageYOffset
  };
}
function gn(e) {
  if (Dt(e) === "html")
    return e;
  const t = (
    // Step into the shadow DOM of the parent of a slotted node.
    e.assignedSlot || // DOM Element detected.
    e.parentNode || // ShadowRoot detected.
    ei(e) && e.host || // Fallback.
    Ct(e)
  );
  return ei(t) ? t.host : t;
}
function md(e) {
  const t = gn(e);
  return Nr(t) ? e.ownerDocument ? e.ownerDocument.body : e.body : it(t) && wo(t) ? t : md(t);
}
function to(e, t, n) {
  var o;
  t === void 0 && (t = []), n === void 0 && (n = !0);
  const r = md(e), a = r === ((o = e.ownerDocument) == null ? void 0 : o.body), c = Xe(r);
  return a ? t.concat(c, c.visualViewport || [], wo(r) ? r : [], c.frameElement && n ? to(c.frameElement) : []) : t.concat(r, to(r, [], n));
}
function bd(e) {
  const t = Ze(e);
  let n = parseFloat(t.width) || 0, o = parseFloat(t.height) || 0;
  const r = it(e), a = r ? e.offsetWidth : n, c = r ? e.offsetHeight : o, s = Jo(n) !== a || Jo(o) !== c;
  return s && (n = a, o = c), {
    width: n,
    height: o,
    $: s
  };
}
function Nc(e) {
  return xt(e) ? e : e.contextElement;
}
function bn(e) {
  const t = Nc(e);
  if (!it(t))
    return Mt(1);
  const n = t.getBoundingClientRect(), {
    width: o,
    height: r,
    $: a
  } = bd(t);
  let c = (a ? Jo(n.width) : n.width) / o, s = (a ? Jo(n.height) : n.height) / r;
  return (!c || !Number.isFinite(c)) && (c = 1), (!s || !Number.isFinite(s)) && (s = 1), {
    x: c,
    y: s
  };
}
const t1 = /* @__PURE__ */ Mt(0);
function vd(e) {
  const t = Xe(e);
  return !Tc() || !t.visualViewport ? t1 : {
    x: t.visualViewport.offsetLeft,
    y: t.visualViewport.offsetTop
  };
}
function n1(e, t, n) {
  return t === void 0 && (t = !1), !n || t && n !== Xe(e) ? !1 : t;
}
function Zt(e, t, n, o) {
  t === void 0 && (t = !1), n === void 0 && (n = !1);
  const r = e.getBoundingClientRect(), a = Nc(e);
  let c = Mt(1);
  t && (o ? xt(o) && (c = bn(o)) : c = bn(e));
  const s = n1(a, n, o) ? vd(a) : Mt(0);
  let i = (r.left + s.x) / c.x, l = (r.top + s.y) / c.y, u = r.width / c.x, d = r.height / c.y;
  if (a) {
    const f = Xe(a), m = o && xt(o) ? Xe(o) : o;
    let b = f, p = b.frameElement;
    for (; p && o && m !== b; ) {
      const g = bn(p), h = p.getBoundingClientRect(), $ = Ze(p), x = h.left + (p.clientLeft + parseFloat($.paddingLeft)) * g.x, C = h.top + (p.clientTop + parseFloat($.paddingTop)) * g.y;
      i *= g.x, l *= g.y, u *= g.x, d *= g.y, i += x, l += C, b = Xe(p), p = b.frameElement;
    }
  }
  return tr({
    width: u,
    height: d,
    x: i,
    y: l
  });
}
const o1 = [":popover-open", ":modal"];
function gd(e) {
  return o1.some((t) => {
    try {
      return e.matches(t);
    } catch {
      return !1;
    }
  });
}
function r1(e) {
  let {
    elements: t,
    rect: n,
    offsetParent: o,
    strategy: r
  } = e;
  const a = r === "fixed", c = Ct(o), s = t ? gd(t.floating) : !1;
  if (o === c || s && a)
    return n;
  let i = {
    scrollLeft: 0,
    scrollTop: 0
  }, l = Mt(1);
  const u = Mt(0), d = it(o);
  if ((d || !d && !a) && ((Dt(o) !== "body" || wo(c)) && (i = Rr(o)), it(o))) {
    const f = Zt(o);
    l = bn(o), u.x = f.x + o.clientLeft, u.y = f.y + o.clientTop;
  }
  return {
    width: n.width * l.x,
    height: n.height * l.y,
    x: n.x * l.x - i.scrollLeft * l.x + u.x,
    y: n.y * l.y - i.scrollTop * l.y + u.y
  };
}
function a1(e) {
  return Array.from(e.getClientRects());
}
function hd(e) {
  return Zt(Ct(e)).left + Rr(e).scrollLeft;
}
function c1(e) {
  const t = Ct(e), n = Rr(e), o = e.ownerDocument.body, r = Ye(t.scrollWidth, t.clientWidth, o.scrollWidth, o.clientWidth), a = Ye(t.scrollHeight, t.clientHeight, o.scrollHeight, o.clientHeight);
  let c = -n.scrollLeft + hd(e);
  const s = -n.scrollTop;
  return Ze(o).direction === "rtl" && (c += Ye(t.clientWidth, o.clientWidth) - r), {
    width: r,
    height: a,
    x: c,
    y: s
  };
}
function s1(e, t) {
  const n = Xe(e), o = Ct(e), r = n.visualViewport;
  let a = o.clientWidth, c = o.clientHeight, s = 0, i = 0;
  if (r) {
    a = r.width, c = r.height;
    const l = Tc();
    (!l || l && t === "fixed") && (s = r.offsetLeft, i = r.offsetTop);
  }
  return {
    width: a,
    height: c,
    x: s,
    y: i
  };
}
function i1(e, t) {
  const n = Zt(e, !0, t === "fixed"), o = n.top + e.clientTop, r = n.left + e.clientLeft, a = it(e) ? bn(e) : Mt(1), c = e.clientWidth * a.x, s = e.clientHeight * a.y, i = r * a.x, l = o * a.y;
  return {
    width: c,
    height: s,
    x: i,
    y: l
  };
}
function ti(e, t, n) {
  let o;
  if (t === "viewport")
    o = s1(e, n);
  else if (t === "document")
    o = c1(Ct(e));
  else if (xt(t))
    o = i1(t, n);
  else {
    const r = vd(e);
    o = {
      ...t,
      x: t.x - r.x,
      y: t.y - r.y
    };
  }
  return tr(o);
}
function $d(e, t) {
  const n = gn(e);
  return n === t || !xt(n) || Nr(n) ? !1 : Ze(n).position === "fixed" || $d(n, t);
}
function l1(e, t) {
  const n = t.get(e);
  if (n)
    return n;
  let o = to(e, [], !1).filter((s) => xt(s) && Dt(s) !== "body"), r = null;
  const a = Ze(e).position === "fixed";
  let c = a ? gn(e) : e;
  for (; xt(c) && !Nr(c); ) {
    const s = Ze(c), i = _c(c);
    !i && s.position === "fixed" && (r = null), (a ? !i && !r : !i && s.position === "static" && !!r && ["absolute", "fixed"].includes(r.position) || wo(c) && !i && $d(e, c)) ? o = o.filter((u) => u !== c) : r = s, c = gn(c);
  }
  return t.set(e, o), o;
}
function d1(e) {
  let {
    element: t,
    boundary: n,
    rootBoundary: o,
    strategy: r
  } = e;
  const c = [...n === "clippingAncestors" ? l1(t, this._c) : [].concat(n), o], s = c[0], i = c.reduce((l, u) => {
    const d = ti(t, u, r);
    return l.top = Ye(d.top, l.top), l.right = At(d.right, l.right), l.bottom = At(d.bottom, l.bottom), l.left = Ye(d.left, l.left), l;
  }, ti(t, s, r));
  return {
    width: i.right - i.left,
    height: i.bottom - i.top,
    x: i.left,
    y: i.top
  };
}
function u1(e) {
  const {
    width: t,
    height: n
  } = bd(e);
  return {
    width: t,
    height: n
  };
}
function f1(e, t, n) {
  const o = it(t), r = Ct(t), a = n === "fixed", c = Zt(e, !0, a, t);
  let s = {
    scrollLeft: 0,
    scrollTop: 0
  };
  const i = Mt(0);
  if (o || !o && !a)
    if ((Dt(t) !== "body" || wo(r)) && (s = Rr(t)), o) {
      const d = Zt(t, !0, a, t);
      i.x = d.x + t.clientLeft, i.y = d.y + t.clientTop;
    } else
      r && (i.x = hd(r));
  const l = c.left + s.scrollLeft - i.x, u = c.top + s.scrollTop - i.y;
  return {
    x: l,
    y: u,
    width: c.width,
    height: c.height
  };
}
function ni(e, t) {
  return !it(e) || Ze(e).position === "fixed" ? null : t ? t(e) : e.offsetParent;
}
function xd(e, t) {
  const n = Xe(e);
  if (!it(e) || gd(e))
    return n;
  let o = ni(e, t);
  for (; o && J$(o) && Ze(o).position === "static"; )
    o = ni(o, t);
  return o && (Dt(o) === "html" || Dt(o) === "body" && Ze(o).position === "static" && !_c(o)) ? n : o || e1(e) || n;
}
const p1 = async function(e) {
  const t = this.getOffsetParent || xd, n = this.getDimensions;
  return {
    reference: f1(e.reference, await t(e.floating), e.strategy),
    floating: {
      x: 0,
      y: 0,
      ...await n(e.floating)
    }
  };
};
function m1(e) {
  return Ze(e).direction === "rtl";
}
const b1 = {
  convertOffsetParentRelativeRectToViewportRelativeRect: r1,
  getDocumentElement: Ct,
  getClippingRect: d1,
  getOffsetParent: xd,
  getElementRects: p1,
  getClientRects: a1,
  getDimensions: u1,
  getScale: bn,
  isElement: xt,
  isRTL: m1
};
function v1(e, t) {
  let n = null, o;
  const r = Ct(e);
  function a() {
    var s;
    clearTimeout(o), (s = n) == null || s.disconnect(), n = null;
  }
  function c(s, i) {
    s === void 0 && (s = !1), i === void 0 && (i = 1), a();
    const {
      left: l,
      top: u,
      width: d,
      height: f
    } = e.getBoundingClientRect();
    if (s || t(), !d || !f)
      return;
    const m = zo(u), b = zo(r.clientWidth - (l + d)), p = zo(r.clientHeight - (u + f)), g = zo(l), $ = {
      rootMargin: -m + "px " + -b + "px " + -p + "px " + -g + "px",
      threshold: Ye(0, At(1, i)) || 1
    };
    let x = !0;
    function C(y) {
      const E = y[0].intersectionRatio;
      if (E !== i) {
        if (!x)
          return c();
        E ? c(!1, E) : o = setTimeout(() => {
          c(!1, 1e-7);
        }, 100);
      }
      x = !1;
    }
    try {
      n = new IntersectionObserver(C, {
        ...$,
        // Handle <iframe>s
        root: r.ownerDocument
      });
    } catch {
      n = new IntersectionObserver(C, $);
    }
    n.observe(e);
  }
  return c(!0), a;
}
function g1(e, t, n, o) {
  o === void 0 && (o = {});
  const {
    ancestorScroll: r = !0,
    ancestorResize: a = !0,
    elementResize: c = typeof ResizeObserver == "function",
    layoutShift: s = typeof IntersectionObserver == "function",
    animationFrame: i = !1
  } = o, l = Nc(e), u = r || a ? [...l ? to(l) : [], ...to(t)] : [];
  u.forEach((h) => {
    r && h.addEventListener("scroll", n, {
      passive: !0
    }), a && h.addEventListener("resize", n);
  });
  const d = l && s ? v1(l, n) : null;
  let f = -1, m = null;
  c && (m = new ResizeObserver((h) => {
    let [$] = h;
    $ && $.target === l && m && (m.unobserve(t), cancelAnimationFrame(f), f = requestAnimationFrame(() => {
      var x;
      (x = m) == null || x.observe(t);
    })), n();
  }), l && !i && m.observe(l), m.observe(t));
  let b, p = i ? Zt(e) : null;
  i && g();
  function g() {
    const h = Zt(e);
    p && (h.x !== p.x || h.y !== p.y || h.width !== p.width || h.height !== p.height) && n(), p = h, b = requestAnimationFrame(g);
  }
  return n(), () => {
    var h;
    u.forEach(($) => {
      r && $.removeEventListener("scroll", n), a && $.removeEventListener("resize", n);
    }), d == null || d(), (h = m) == null || h.disconnect(), m = null, i && cancelAnimationFrame(b);
  };
}
const h1 = q$, $1 = W$, x1 = Q$, w1 = j$, oi = U$, y1 = Z$, C1 = (e, t, n) => {
  const o = /* @__PURE__ */ new Map(), r = {
    platform: b1,
    ...n
  }, a = {
    ...r.platform,
    _c: o
  };
  return G$(e, t, {
    ...r,
    platform: a
  });
}, S1 = (e) => {
  function t(n) {
    return {}.hasOwnProperty.call(n, "current");
  }
  return {
    name: "arrow",
    options: e,
    fn(n) {
      const {
        element: o,
        padding: r
      } = typeof e == "function" ? e(n) : e;
      return o && t(o) ? o.current != null ? oi({
        element: o.current,
        padding: r
      }).fn(n) : {} : o ? oi({
        element: o,
        padding: r
      }).fn(n) : {};
    }
  };
};
var Yo = typeof document < "u" ? dr : j;
function nr(e, t) {
  if (e === t)
    return !0;
  if (typeof e != typeof t)
    return !1;
  if (typeof e == "function" && e.toString() === t.toString())
    return !0;
  let n, o, r;
  if (e && t && typeof e == "object") {
    if (Array.isArray(e)) {
      if (n = e.length, n !== t.length)
        return !1;
      for (o = n; o-- !== 0; )
        if (!nr(e[o], t[o]))
          return !1;
      return !0;
    }
    if (r = Object.keys(e), n = r.length, n !== Object.keys(t).length)
      return !1;
    for (o = n; o-- !== 0; )
      if (!{}.hasOwnProperty.call(t, r[o]))
        return !1;
    for (o = n; o-- !== 0; ) {
      const a = r[o];
      if (!(a === "_owner" && e.$$typeof) && !nr(e[a], t[a]))
        return !1;
    }
    return !0;
  }
  return e !== e && t !== t;
}
function wd(e) {
  return typeof window > "u" ? 1 : (e.ownerDocument.defaultView || window).devicePixelRatio || 1;
}
function ri(e, t) {
  const n = wd(e);
  return Math.round(t * n) / n;
}
function ai(e) {
  const t = w.useRef(e);
  return Yo(() => {
    t.current = e;
  }), t;
}
function E1(e) {
  e === void 0 && (e = {});
  const {
    placement: t = "bottom",
    strategy: n = "absolute",
    middleware: o = [],
    platform: r,
    elements: {
      reference: a,
      floating: c
    } = {},
    transform: s = !0,
    whileElementsMounted: i,
    open: l
  } = e, [u, d] = w.useState({
    x: 0,
    y: 0,
    strategy: n,
    placement: t,
    middlewareData: {},
    isPositioned: !1
  }), [f, m] = w.useState(o);
  nr(f, o) || m(o);
  const [b, p] = w.useState(null), [g, h] = w.useState(null), $ = w.useCallback((oe) => {
    oe !== E.current && (E.current = oe, p(oe));
  }, []), x = w.useCallback((oe) => {
    oe !== T.current && (T.current = oe, h(oe));
  }, []), C = a || b, y = c || g, E = w.useRef(null), T = w.useRef(null), R = w.useRef(u), N = i != null, H = ai(i), K = ai(r), I = w.useCallback(() => {
    if (!E.current || !T.current)
      return;
    const oe = {
      placement: t,
      strategy: n,
      middleware: f
    };
    K.current && (oe.platform = K.current), C1(E.current, T.current, oe).then((se) => {
      const Y = {
        ...se,
        isPositioned: !0
      };
      Q.current && !nr(R.current, Y) && (R.current = Y, Cm.flushSync(() => {
        d(Y);
      }));
    });
  }, [f, t, n, K]);
  Yo(() => {
    l === !1 && R.current.isPositioned && (R.current.isPositioned = !1, d((oe) => ({
      ...oe,
      isPositioned: !1
    })));
  }, [l]);
  const Q = w.useRef(!1);
  Yo(() => (Q.current = !0, () => {
    Q.current = !1;
  }), []), Yo(() => {
    if (C && (E.current = C), y && (T.current = y), C && y) {
      if (H.current)
        return H.current(C, y, I);
      I();
    }
  }, [C, y, I, H, N]);
  const D = w.useMemo(() => ({
    reference: E,
    floating: T,
    setReference: $,
    setFloating: x
  }), [$, x]), V = w.useMemo(() => ({
    reference: C,
    floating: y
  }), [C, y]), J = w.useMemo(() => {
    const oe = {
      position: n,
      left: 0,
      top: 0
    };
    if (!V.floating)
      return oe;
    const se = ri(V.floating, u.x), Y = ri(V.floating, u.y);
    return s ? {
      ...oe,
      transform: "translate(" + se + "px, " + Y + "px)",
      ...wd(V.floating) >= 1.5 && {
        willChange: "transform"
      }
    } : {
      position: n,
      left: se,
      top: Y
    };
  }, [n, s, V.floating, u.x, u.y]);
  return w.useMemo(() => ({
    ...u,
    update: I,
    refs: D,
    elements: V,
    floatingStyles: J
  }), [u, I, D, V, J]);
}
const yd = "Popper", [Cd, lt] = we(yd), [P1, Sd] = Cd(yd), _1 = (e) => {
  const { __scopePopper: t, children: n } = e, [o, r] = q(null);
  return /* @__PURE__ */ v(P1, {
    scope: t,
    anchor: o,
    onAnchorChange: r
  }, n);
}, T1 = "PopperAnchor", N1 = /* @__PURE__ */ _((e, t) => {
  const { __scopePopper: n, virtualRef: o, ...r } = e, a = Sd(T1, n), c = A(null), s = ae(t, c);
  return j(() => {
    a.onAnchorChange((o == null ? void 0 : o.current) || c.current);
  }), o ? null : /* @__PURE__ */ v(Z.div, S({}, r, {
    ref: s
  }));
}), Ed = "PopperContent", [R1, j7] = Cd(Ed), A1 = /* @__PURE__ */ _((e, t) => {
  var n, o, r, a, c, s, i, l;
  const { __scopePopper: u, side: d = "bottom", sideOffset: f = 0, align: m = "center", alignOffset: b = 0, arrowPadding: p = 0, avoidCollisions: g = !0, collisionBoundary: h = [], collisionPadding: $ = 0, sticky: x = "partial", hideWhenDetached: C = !1, updatePositionStrategy: y = "optimized", onPlaced: E, ...T } = e, R = Sd(Ed, u), [N, H] = q(null), K = ae(
    t,
    (fe) => H(fe)
  ), [I, Q] = q(null), D = go(I), V = (n = D == null ? void 0 : D.width) !== null && n !== void 0 ? n : 0, J = (o = D == null ? void 0 : D.height) !== null && o !== void 0 ? o : 0, oe = d + (m !== "center" ? "-" + m : ""), se = typeof $ == "number" ? $ : {
    top: 0,
    right: 0,
    bottom: 0,
    left: 0,
    ...$
  }, Y = Array.isArray(h) ? h : [
    h
  ], k = Y.length > 0, W = {
    padding: se,
    boundary: Y.filter(M1),
    // with `strategy: 'fixed'`, this is the only way to get it to respect boundaries
    altBoundary: k
  }, { refs: L, floatingStyles: z, placement: X, isPositioned: ee, middlewareData: B } = E1({
    // default to `fixed` strategy so users don't have to pick and we also avoid focus scroll issues
    strategy: "fixed",
    placement: oe,
    whileElementsMounted: (...fe) => g1(...fe, {
      animationFrame: y === "always"
    }),
    elements: {
      reference: R.anchor
    },
    middleware: [
      X$({
        mainAxis: f + J,
        alignmentAxis: b
      }),
      g && h1({
        mainAxis: !0,
        crossAxis: !1,
        limiter: x === "partial" ? y1() : void 0,
        ...W
      }),
      g && $1({
        ...W
      }),
      x1({
        ...W,
        apply: ({ elements: fe, rects: Te, availableWidth: De, availableHeight: Oe }) => {
          const { width: Ae, height: et } = Te.reference, tt = fe.floating.style;
          tt.setProperty("--radix-popper-available-width", `${De}px`), tt.setProperty("--radix-popper-available-height", `${Oe}px`), tt.setProperty("--radix-popper-anchor-width", `${Ae}px`), tt.setProperty("--radix-popper-anchor-height", `${et}px`);
        }
      }),
      I && S1({
        element: I,
        padding: p
      }),
      D1({
        arrowWidth: V,
        arrowHeight: J
      }),
      C && w1({
        strategy: "referenceHidden",
        ...W
      })
    ]
  }), [U, te] = Pd(X), ce = ge(E);
  Re(() => {
    ee && (ce == null || ce());
  }, [
    ee,
    ce
  ]);
  const ie = (r = B.arrow) === null || r === void 0 ? void 0 : r.x, ne = (a = B.arrow) === null || a === void 0 ? void 0 : a.y, G = ((c = B.arrow) === null || c === void 0 ? void 0 : c.centerOffset) !== 0, [de, ue] = q();
  return Re(() => {
    N && ue(window.getComputedStyle(N).zIndex);
  }, [
    N
  ]), /* @__PURE__ */ v("div", {
    ref: L.setFloating,
    "data-radix-popper-content-wrapper": "",
    style: {
      ...z,
      transform: ee ? z.transform : "translate(0, -200%)",
      // keep off the page when measuring
      minWidth: "max-content",
      zIndex: de,
      "--radix-popper-transform-origin": [
        (s = B.transformOrigin) === null || s === void 0 ? void 0 : s.x,
        (i = B.transformOrigin) === null || i === void 0 ? void 0 : i.y
      ].join(" ")
    },
    dir: e.dir
  }, /* @__PURE__ */ v(R1, {
    scope: u,
    placedSide: U,
    onArrowChange: Q,
    arrowX: ie,
    arrowY: ne,
    shouldHideArrow: G
  }, /* @__PURE__ */ v(Z.div, S({
    "data-side": U,
    "data-align": te
  }, T, {
    ref: K,
    style: {
      ...T.style,
      // if the PopperContent hasn't been placed yet (not all measurements done)
      // we prevent animations so that users's animation don't kick in too early referring wrong sides
      animation: ee ? void 0 : "none",
      // hide the content if using the hide middleware and should be hidden
      opacity: (l = B.hide) !== null && l !== void 0 && l.referenceHidden ? 0 : void 0
    }
  }))));
});
function M1(e) {
  return e !== null;
}
const D1 = (e) => ({
  name: "transformOrigin",
  options: e,
  fn(t) {
    var n, o, r, a, c;
    const { placement: s, rects: i, middlewareData: l } = t, d = ((n = l.arrow) === null || n === void 0 ? void 0 : n.centerOffset) !== 0, f = d ? 0 : e.arrowWidth, m = d ? 0 : e.arrowHeight, [b, p] = Pd(s), g = {
      start: "0%",
      center: "50%",
      end: "100%"
    }[p], h = ((o = (r = l.arrow) === null || r === void 0 ? void 0 : r.x) !== null && o !== void 0 ? o : 0) + f / 2, $ = ((a = (c = l.arrow) === null || c === void 0 ? void 0 : c.y) !== null && a !== void 0 ? a : 0) + m / 2;
    let x = "", C = "";
    return b === "bottom" ? (x = d ? g : `${h}px`, C = `${-m}px`) : b === "top" ? (x = d ? g : `${h}px`, C = `${i.floating.height + m}px`) : b === "right" ? (x = `${-m}px`, C = d ? g : `${$}px`) : b === "left" && (x = `${i.floating.width + m}px`, C = d ? g : `${$}px`), {
      data: {
        x,
        y: C
      }
    };
  }
});
function Pd(e) {
  const [t, n = "center"] = e.split("-");
  return [
    t,
    n
  ];
}
const An = _1, yo = N1, Co = A1, ua = "rovingFocusGroup.onEntryFocus", I1 = {
  bubbles: !1,
  cancelable: !0
}, Rc = "RovingFocusGroup", [Oa, _d, O1] = wt(Rc), [k1, dt] = we(Rc, [
  O1
]), [L1, F1] = k1(Rc), z1 = /* @__PURE__ */ _((e, t) => /* @__PURE__ */ v(Oa.Provider, {
  scope: e.__scopeRovingFocusGroup
}, /* @__PURE__ */ v(Oa.Slot, {
  scope: e.__scopeRovingFocusGroup
}, /* @__PURE__ */ v(V1, S({}, e, {
  ref: t
}))))), V1 = /* @__PURE__ */ _((e, t) => {
  const { __scopeRovingFocusGroup: n, orientation: o, loop: r = !1, dir: a, currentTabStopId: c, defaultCurrentTabStopId: s, onCurrentTabStopIdChange: i, onEntryFocus: l, ...u } = e, d = A(null), f = ae(t, d), m = rt(a), [b = null, p] = Se({
    prop: c,
    defaultProp: s,
    onChange: i
  }), [g, h] = q(!1), $ = ge(l), x = _d(n), C = A(!1), [y, E] = q(0);
  return j(() => {
    const T = d.current;
    if (T)
      return T.addEventListener(ua, $), () => T.removeEventListener(ua, $);
  }, [
    $
  ]), /* @__PURE__ */ v(L1, {
    scope: n,
    orientation: o,
    dir: m,
    loop: r,
    currentTabStopId: b,
    onItemFocus: re(
      (T) => p(T),
      [
        p
      ]
    ),
    onItemShiftTab: re(
      () => h(!0),
      []
    ),
    onFocusableItemAdd: re(
      () => E(
        (T) => T + 1
      ),
      []
    ),
    onFocusableItemRemove: re(
      () => E(
        (T) => T - 1
      ),
      []
    )
  }, /* @__PURE__ */ v(Z.div, S({
    tabIndex: g || y === 0 ? -1 : 0,
    "data-orientation": o
  }, u, {
    ref: f,
    style: {
      outline: "none",
      ...e.style
    },
    onMouseDown: O(e.onMouseDown, () => {
      C.current = !0;
    }),
    onFocus: O(e.onFocus, (T) => {
      const R = !C.current;
      if (T.target === T.currentTarget && R && !g) {
        const N = new CustomEvent(ua, I1);
        if (T.currentTarget.dispatchEvent(N), !N.defaultPrevented) {
          const H = x().filter(
            (V) => V.focusable
          ), K = H.find(
            (V) => V.active
          ), I = H.find(
            (V) => V.id === b
          ), D = [
            K,
            I,
            ...H
          ].filter(Boolean).map(
            (V) => V.ref.current
          );
          Td(D);
        }
      }
      C.current = !1;
    }),
    onBlur: O(
      e.onBlur,
      () => h(!1)
    )
  })));
}), H1 = "RovingFocusGroupItem", B1 = /* @__PURE__ */ _((e, t) => {
  const { __scopeRovingFocusGroup: n, focusable: o = !0, active: r = !1, tabStopId: a, ...c } = e, s = Me(), i = a || s, l = F1(H1, n), u = l.currentTabStopId === i, d = _d(n), { onFocusableItemAdd: f, onFocusableItemRemove: m } = l;
  return j(() => {
    if (o)
      return f(), () => m();
  }, [
    o,
    f,
    m
  ]), /* @__PURE__ */ v(Oa.ItemSlot, {
    scope: n,
    id: i,
    focusable: o,
    active: r
  }, /* @__PURE__ */ v(Z.span, S({
    tabIndex: u ? 0 : -1,
    "data-orientation": l.orientation
  }, c, {
    ref: t,
    onMouseDown: O(e.onMouseDown, (b) => {
      o ? l.onItemFocus(i) : b.preventDefault();
    }),
    onFocus: O(
      e.onFocus,
      () => l.onItemFocus(i)
    ),
    onKeyDown: O(e.onKeyDown, (b) => {
      if (b.key === "Tab" && b.shiftKey) {
        l.onItemShiftTab();
        return;
      }
      if (b.target !== b.currentTarget)
        return;
      const p = U1(b, l.orientation, l.dir);
      if (p !== void 0) {
        b.preventDefault();
        let h = d().filter(
          ($) => $.focusable
        ).map(
          ($) => $.ref.current
        );
        if (p === "last")
          h.reverse();
        else if (p === "prev" || p === "next") {
          p === "prev" && h.reverse();
          const $ = h.indexOf(b.currentTarget);
          h = l.loop ? W1(h, $ + 1) : h.slice($ + 1);
        }
        setTimeout(
          () => Td(h)
        );
      }
    })
  })));
}), K1 = {
  ArrowLeft: "prev",
  ArrowUp: "prev",
  ArrowRight: "next",
  ArrowDown: "next",
  PageUp: "first",
  Home: "first",
  PageDown: "last",
  End: "last"
};
function G1(e, t) {
  return t !== "rtl" ? e : e === "ArrowLeft" ? "ArrowRight" : e === "ArrowRight" ? "ArrowLeft" : e;
}
function U1(e, t, n) {
  const o = G1(e.key, n);
  if (!(t === "vertical" && [
    "ArrowLeft",
    "ArrowRight"
  ].includes(o)) && !(t === "horizontal" && [
    "ArrowUp",
    "ArrowDown"
  ].includes(o)))
    return K1[o];
}
function Td(e) {
  const t = document.activeElement;
  for (const n of e)
    if (n === t || (n.focus(), document.activeElement !== t))
      return;
}
function W1(e, t) {
  return e.map(
    (n, o) => e[(t + o) % e.length]
  );
}
const So = z1, Eo = B1, ka = [
  "Enter",
  " "
], j1 = [
  "ArrowDown",
  "PageUp",
  "Home"
], Nd = [
  "ArrowUp",
  "PageDown",
  "End"
], Y1 = [
  ...j1,
  ...Nd
], X1 = {
  ltr: [
    ...ka,
    "ArrowRight"
  ],
  rtl: [
    ...ka,
    "ArrowLeft"
  ]
}, q1 = {
  ltr: [
    "ArrowLeft"
  ],
  rtl: [
    "ArrowRight"
  ]
}, Ar = "Menu", [no, Z1, Q1] = wt(Ar), [tn, Po] = we(Ar, [
  Q1,
  lt,
  dt
]), Mr = lt(), Rd = dt(), [Ad, Lt] = tn(Ar), [J1, _o] = tn(Ar), ex = (e) => {
  const { __scopeMenu: t, open: n = !1, children: o, dir: r, onOpenChange: a, modal: c = !0 } = e, s = Mr(t), [i, l] = q(null), u = A(!1), d = ge(a), f = rt(r);
  return j(() => {
    const m = () => {
      u.current = !0, document.addEventListener("pointerdown", b, {
        capture: !0,
        once: !0
      }), document.addEventListener("pointermove", b, {
        capture: !0,
        once: !0
      });
    }, b = () => u.current = !1;
    return document.addEventListener("keydown", m, {
      capture: !0
    }), () => {
      document.removeEventListener("keydown", m, {
        capture: !0
      }), document.removeEventListener("pointerdown", b, {
        capture: !0
      }), document.removeEventListener("pointermove", b, {
        capture: !0
      });
    };
  }, []), /* @__PURE__ */ v(An, s, /* @__PURE__ */ v(Ad, {
    scope: t,
    open: n,
    onOpenChange: d,
    content: i,
    onContentChange: l
  }, /* @__PURE__ */ v(J1, {
    scope: t,
    onClose: re(
      () => d(!1),
      [
        d
      ]
    ),
    isUsingKeyboardRef: u,
    dir: f,
    modal: c
  }, o)));
}, Md = /* @__PURE__ */ _((e, t) => {
  const { __scopeMenu: n, ...o } = e, r = Mr(n);
  return /* @__PURE__ */ v(yo, S({}, r, o, {
    ref: t
  }));
}), Dd = "MenuPortal", [tx, Id] = tn(Dd, {
  forceMount: void 0
}), nx = (e) => {
  const { __scopeMenu: t, forceMount: n, children: o, container: r } = e, a = Lt(Dd, t);
  return /* @__PURE__ */ v(tx, {
    scope: t,
    forceMount: n
  }, /* @__PURE__ */ v(Ee, {
    present: n || a.open
  }, /* @__PURE__ */ v(mo, {
    asChild: !0,
    container: r
  }, o)));
}, ot = "MenuContent", [ox, Ac] = tn(ot), rx = /* @__PURE__ */ _((e, t) => {
  const n = Id(ot, e.__scopeMenu), { forceMount: o = n.forceMount, ...r } = e, a = Lt(ot, e.__scopeMenu), c = _o(ot, e.__scopeMenu);
  return /* @__PURE__ */ v(no.Provider, {
    scope: e.__scopeMenu
  }, /* @__PURE__ */ v(Ee, {
    present: o || a.open
  }, /* @__PURE__ */ v(no.Slot, {
    scope: e.__scopeMenu
  }, c.modal ? /* @__PURE__ */ v(ax, S({}, r, {
    ref: t
  })) : /* @__PURE__ */ v(cx, S({}, r, {
    ref: t
  })))));
}), ax = /* @__PURE__ */ _((e, t) => {
  const n = Lt(ot, e.__scopeMenu), o = A(null), r = ae(t, o);
  return j(() => {
    const a = o.current;
    if (a)
      return bo(a);
  }, []), /* @__PURE__ */ v(Mc, S({}, e, {
    ref: r,
    trapFocus: n.open,
    disableOutsidePointerEvents: n.open,
    disableOutsideScroll: !0,
    onFocusOutside: O(
      e.onFocusOutside,
      (a) => a.preventDefault(),
      {
        checkForDefaultPrevented: !1
      }
    ),
    onDismiss: () => n.onOpenChange(!1)
  }));
}), cx = /* @__PURE__ */ _((e, t) => {
  const n = Lt(ot, e.__scopeMenu);
  return /* @__PURE__ */ v(Mc, S({}, e, {
    ref: t,
    trapFocus: !1,
    disableOutsidePointerEvents: !1,
    disableOutsideScroll: !1,
    onDismiss: () => n.onOpenChange(!1)
  }));
}), Mc = /* @__PURE__ */ _((e, t) => {
  const { __scopeMenu: n, loop: o = !1, trapFocus: r, onOpenAutoFocus: a, onCloseAutoFocus: c, disableOutsidePointerEvents: s, onEntryFocus: i, onEscapeKeyDown: l, onPointerDownOutside: u, onFocusOutside: d, onInteractOutside: f, onDismiss: m, disableOutsideScroll: b, ...p } = e, g = Lt(ot, n), h = _o(ot, n), $ = Mr(n), x = Rd(n), C = Z1(n), [y, E] = q(null), T = A(null), R = ae(t, T, g.onContentChange), N = A(0), H = A(""), K = A(0), I = A(null), Q = A("right"), D = A(0), V = b ? xr : Ge, J = b ? {
    as: gt,
    allowPinchZoom: !0
  } : void 0, oe = (Y) => {
    var k, W;
    const L = H.current + Y, z = C().filter(
      (ce) => !ce.disabled
    ), X = document.activeElement, ee = (k = z.find(
      (ce) => ce.ref.current === X
    )) === null || k === void 0 ? void 0 : k.textValue, B = z.map(
      (ce) => ce.textValue
    ), U = Ex(B, L, ee), te = (W = z.find(
      (ce) => ce.textValue === U
    )) === null || W === void 0 ? void 0 : W.ref.current;
    (function ce(ie) {
      H.current = ie, window.clearTimeout(N.current), ie !== "" && (N.current = window.setTimeout(
        () => ce(""),
        1e3
      ));
    })(L), te && setTimeout(
      () => te.focus()
    );
  };
  j(() => () => window.clearTimeout(N.current), []), hr();
  const se = re((Y) => {
    var k, W;
    return Q.current === ((k = I.current) === null || k === void 0 ? void 0 : k.side) && _x(Y, (W = I.current) === null || W === void 0 ? void 0 : W.area);
  }, []);
  return /* @__PURE__ */ v(ox, {
    scope: n,
    searchRef: H,
    onItemEnter: re((Y) => {
      se(Y) && Y.preventDefault();
    }, [
      se
    ]),
    onItemLeave: re((Y) => {
      var k;
      se(Y) || ((k = T.current) === null || k === void 0 || k.focus(), E(null));
    }, [
      se
    ]),
    onTriggerLeave: re((Y) => {
      se(Y) && Y.preventDefault();
    }, [
      se
    ]),
    pointerGraceTimerRef: K,
    onPointerGraceIntentChange: re((Y) => {
      I.current = Y;
    }, [])
  }, /* @__PURE__ */ v(V, J, /* @__PURE__ */ v(gr, {
    asChild: !0,
    trapped: r,
    onMountAutoFocus: O(a, (Y) => {
      var k;
      Y.preventDefault(), (k = T.current) === null || k === void 0 || k.focus();
    }),
    onUnmountAutoFocus: c
  }, /* @__PURE__ */ v(Ot, {
    asChild: !0,
    disableOutsidePointerEvents: s,
    onEscapeKeyDown: l,
    onPointerDownOutside: u,
    onFocusOutside: d,
    onInteractOutside: f,
    onDismiss: m
  }, /* @__PURE__ */ v(So, S({
    asChild: !0
  }, x, {
    dir: h.dir,
    orientation: "vertical",
    loop: o,
    currentTabStopId: y,
    onCurrentTabStopIdChange: E,
    onEntryFocus: O(i, (Y) => {
      h.isUsingKeyboardRef.current || Y.preventDefault();
    })
  }), /* @__PURE__ */ v(Co, S({
    role: "menu",
    "aria-orientation": "vertical",
    "data-state": Hd(g.open),
    "data-radix-menu-content": "",
    dir: h.dir
  }, $, p, {
    ref: R,
    style: {
      outline: "none",
      ...p.style
    },
    onKeyDown: O(p.onKeyDown, (Y) => {
      const W = Y.target.closest("[data-radix-menu-content]") === Y.currentTarget, L = Y.ctrlKey || Y.altKey || Y.metaKey, z = Y.key.length === 1;
      W && (Y.key === "Tab" && Y.preventDefault(), !L && z && oe(Y.key));
      const X = T.current;
      if (Y.target !== X || !Y1.includes(Y.key))
        return;
      Y.preventDefault();
      const B = C().filter(
        (U) => !U.disabled
      ).map(
        (U) => U.ref.current
      );
      Nd.includes(Y.key) && B.reverse(), Cx(B);
    }),
    onBlur: O(e.onBlur, (Y) => {
      Y.currentTarget.contains(Y.target) || (window.clearTimeout(N.current), H.current = "");
    }),
    onPointerMove: O(e.onPointerMove, oo((Y) => {
      const k = Y.target, W = D.current !== Y.clientX;
      if (Y.currentTarget.contains(k) && W) {
        const L = Y.clientX > D.current ? "right" : "left";
        Q.current = L, D.current = Y.clientX;
      }
    }))
  })))))));
}), Od = /* @__PURE__ */ _((e, t) => {
  const { __scopeMenu: n, ...o } = e;
  return /* @__PURE__ */ v(Z.div, S({
    role: "group"
  }, o, {
    ref: t
  }));
}), sx = /* @__PURE__ */ _((e, t) => {
  const { __scopeMenu: n, ...o } = e;
  return /* @__PURE__ */ v(Z.div, S({}, o, {
    ref: t
  }));
}), La = "MenuItem", ci = "menu.itemSelect", Dc = /* @__PURE__ */ _((e, t) => {
  const { disabled: n = !1, onSelect: o, ...r } = e, a = A(null), c = _o(La, e.__scopeMenu), s = Ac(La, e.__scopeMenu), i = ae(t, a), l = A(!1), u = () => {
    const d = a.current;
    if (!n && d) {
      const f = new CustomEvent(ci, {
        bubbles: !0,
        cancelable: !0
      });
      d.addEventListener(
        ci,
        (m) => o == null ? void 0 : o(m),
        {
          once: !0
        }
      ), Xn(d, f), f.defaultPrevented ? l.current = !1 : c.onClose();
    }
  };
  return /* @__PURE__ */ v(kd, S({}, r, {
    ref: i,
    disabled: n,
    onClick: O(e.onClick, u),
    onPointerDown: (d) => {
      var f;
      (f = e.onPointerDown) === null || f === void 0 || f.call(e, d), l.current = !0;
    },
    onPointerUp: O(e.onPointerUp, (d) => {
      var f;
      l.current || (f = d.currentTarget) === null || f === void 0 || f.click();
    }),
    onKeyDown: O(e.onKeyDown, (d) => {
      const f = s.searchRef.current !== "";
      n || f && d.key === " " || ka.includes(d.key) && (d.currentTarget.click(), d.preventDefault());
    })
  }));
}), kd = /* @__PURE__ */ _((e, t) => {
  const { __scopeMenu: n, disabled: o = !1, textValue: r, ...a } = e, c = Ac(La, n), s = Rd(n), i = A(null), l = ae(t, i), [u, d] = q(!1), [f, m] = q("");
  return j(() => {
    const b = i.current;
    if (b) {
      var p;
      m(((p = b.textContent) !== null && p !== void 0 ? p : "").trim());
    }
  }, [
    a.children
  ]), /* @__PURE__ */ v(no.ItemSlot, {
    scope: n,
    disabled: o,
    textValue: r ?? f
  }, /* @__PURE__ */ v(Eo, S({
    asChild: !0
  }, s, {
    focusable: !o
  }), /* @__PURE__ */ v(Z.div, S({
    role: "menuitem",
    "data-highlighted": u ? "" : void 0,
    "aria-disabled": o || void 0,
    "data-disabled": o ? "" : void 0
  }, a, {
    ref: l,
    onPointerMove: O(e.onPointerMove, oo((b) => {
      o ? c.onItemLeave(b) : (c.onItemEnter(b), b.defaultPrevented || b.currentTarget.focus());
    })),
    onPointerLeave: O(e.onPointerLeave, oo(
      (b) => c.onItemLeave(b)
    )),
    onFocus: O(
      e.onFocus,
      () => d(!0)
    ),
    onBlur: O(
      e.onBlur,
      () => d(!1)
    )
  }))));
}), ix = /* @__PURE__ */ _((e, t) => {
  const { checked: n = !1, onCheckedChange: o, ...r } = e;
  return /* @__PURE__ */ v(Fd, {
    scope: e.__scopeMenu,
    checked: n
  }, /* @__PURE__ */ v(Dc, S({
    role: "menuitemcheckbox",
    "aria-checked": or(n) ? "mixed" : n
  }, r, {
    ref: t,
    "data-state": Ic(n),
    onSelect: O(
      r.onSelect,
      () => o == null ? void 0 : o(or(n) ? !0 : !n),
      {
        checkForDefaultPrevented: !1
      }
    )
  })));
}), lx = "MenuRadioGroup", [dx, ux] = tn(lx, {
  value: void 0,
  onValueChange: () => {
  }
}), fx = /* @__PURE__ */ _((e, t) => {
  const { value: n, onValueChange: o, ...r } = e, a = ge(o);
  return /* @__PURE__ */ v(dx, {
    scope: e.__scopeMenu,
    value: n,
    onValueChange: a
  }, /* @__PURE__ */ v(Od, S({}, r, {
    ref: t
  })));
}), px = "MenuRadioItem", mx = /* @__PURE__ */ _((e, t) => {
  const { value: n, ...o } = e, r = ux(px, e.__scopeMenu), a = n === r.value;
  return /* @__PURE__ */ v(Fd, {
    scope: e.__scopeMenu,
    checked: a
  }, /* @__PURE__ */ v(Dc, S({
    role: "menuitemradio",
    "aria-checked": a
  }, o, {
    ref: t,
    "data-state": Ic(a),
    onSelect: O(o.onSelect, () => {
      var c;
      return (c = r.onValueChange) === null || c === void 0 ? void 0 : c.call(r, n);
    }, {
      checkForDefaultPrevented: !1
    })
  })));
}), Ld = "MenuItemIndicator", [Fd, bx] = tn(Ld, {
  checked: !1
}), vx = /* @__PURE__ */ _((e, t) => {
  const { __scopeMenu: n, forceMount: o, ...r } = e, a = bx(Ld, n);
  return /* @__PURE__ */ v(Ee, {
    present: o || or(a.checked) || a.checked === !0
  }, /* @__PURE__ */ v(Z.span, S({}, r, {
    ref: t,
    "data-state": Ic(a.checked)
  })));
}), gx = /* @__PURE__ */ _((e, t) => {
  const { __scopeMenu: n, ...o } = e;
  return /* @__PURE__ */ v(Z.div, S({
    role: "separator",
    "aria-orientation": "horizontal"
  }, o, {
    ref: t
  }));
}), zd = "MenuSub", [hx, Vd] = tn(zd), $x = (e) => {
  const { __scopeMenu: t, children: n, open: o = !1, onOpenChange: r } = e, a = Lt(zd, t), c = Mr(t), [s, i] = q(null), [l, u] = q(null), d = ge(r);
  return j(() => (a.open === !1 && d(!1), () => d(!1)), [
    a.open,
    d
  ]), /* @__PURE__ */ v(An, c, /* @__PURE__ */ v(Ad, {
    scope: t,
    open: o,
    onOpenChange: d,
    content: l,
    onContentChange: u
  }, /* @__PURE__ */ v(hx, {
    scope: t,
    contentId: Me(),
    triggerId: Me(),
    trigger: s,
    onTriggerChange: i
  }, n)));
}, Vo = "MenuSubTrigger", xx = /* @__PURE__ */ _((e, t) => {
  const n = Lt(Vo, e.__scopeMenu), o = _o(Vo, e.__scopeMenu), r = Vd(Vo, e.__scopeMenu), a = Ac(Vo, e.__scopeMenu), c = A(null), { pointerGraceTimerRef: s, onPointerGraceIntentChange: i } = a, l = {
    __scopeMenu: e.__scopeMenu
  }, u = re(() => {
    c.current && window.clearTimeout(c.current), c.current = null;
  }, []);
  return j(
    () => u,
    [
      u
    ]
  ), j(() => {
    const d = s.current;
    return () => {
      window.clearTimeout(d), i(null);
    };
  }, [
    s,
    i
  ]), /* @__PURE__ */ v(Md, S({
    asChild: !0
  }, l), /* @__PURE__ */ v(kd, S({
    id: r.triggerId,
    "aria-haspopup": "menu",
    "aria-expanded": n.open,
    "aria-controls": r.contentId,
    "data-state": Hd(n.open)
  }, e, {
    ref: fo(t, r.onTriggerChange),
    onClick: (d) => {
      var f;
      (f = e.onClick) === null || f === void 0 || f.call(e, d), !(e.disabled || d.defaultPrevented) && (d.currentTarget.focus(), n.open || n.onOpenChange(!0));
    },
    onPointerMove: O(e.onPointerMove, oo((d) => {
      a.onItemEnter(d), !d.defaultPrevented && !e.disabled && !n.open && !c.current && (a.onPointerGraceIntentChange(null), c.current = window.setTimeout(() => {
        n.onOpenChange(!0), u();
      }, 100));
    })),
    onPointerLeave: O(e.onPointerLeave, oo((d) => {
      var f;
      u();
      const m = (f = n.content) === null || f === void 0 ? void 0 : f.getBoundingClientRect();
      if (m) {
        var b;
        const p = (b = n.content) === null || b === void 0 ? void 0 : b.dataset.side, g = p === "right", h = g ? -5 : 5, $ = m[g ? "left" : "right"], x = m[g ? "right" : "left"];
        a.onPointerGraceIntentChange({
          area: [
            // consistently within polygon bounds
            {
              x: d.clientX + h,
              y: d.clientY
            },
            {
              x: $,
              y: m.top
            },
            {
              x,
              y: m.top
            },
            {
              x,
              y: m.bottom
            },
            {
              x: $,
              y: m.bottom
            }
          ],
          side: p
        }), window.clearTimeout(s.current), s.current = window.setTimeout(
          () => a.onPointerGraceIntentChange(null),
          300
        );
      } else {
        if (a.onTriggerLeave(d), d.defaultPrevented)
          return;
        a.onPointerGraceIntentChange(null);
      }
    })),
    onKeyDown: O(e.onKeyDown, (d) => {
      const f = a.searchRef.current !== "";
      if (!(e.disabled || f && d.key === " ") && X1[o.dir].includes(d.key)) {
        var m;
        n.onOpenChange(!0), (m = n.content) === null || m === void 0 || m.focus(), d.preventDefault();
      }
    })
  })));
}), wx = "MenuSubContent", yx = /* @__PURE__ */ _((e, t) => {
  const n = Id(ot, e.__scopeMenu), { forceMount: o = n.forceMount, ...r } = e, a = Lt(ot, e.__scopeMenu), c = _o(ot, e.__scopeMenu), s = Vd(wx, e.__scopeMenu), i = A(null), l = ae(t, i);
  return /* @__PURE__ */ v(no.Provider, {
    scope: e.__scopeMenu
  }, /* @__PURE__ */ v(Ee, {
    present: o || a.open
  }, /* @__PURE__ */ v(no.Slot, {
    scope: e.__scopeMenu
  }, /* @__PURE__ */ v(Mc, S({
    id: s.contentId,
    "aria-labelledby": s.triggerId
  }, r, {
    ref: l,
    align: "start",
    side: c.dir === "rtl" ? "left" : "right",
    disableOutsidePointerEvents: !1,
    disableOutsideScroll: !1,
    trapFocus: !1,
    onOpenAutoFocus: (u) => {
      var d;
      c.isUsingKeyboardRef.current && ((d = i.current) === null || d === void 0 || d.focus()), u.preventDefault();
    },
    onCloseAutoFocus: (u) => u.preventDefault(),
    onFocusOutside: O(e.onFocusOutside, (u) => {
      u.target !== s.trigger && a.onOpenChange(!1);
    }),
    onEscapeKeyDown: O(e.onEscapeKeyDown, (u) => {
      c.onClose(), u.preventDefault();
    }),
    onKeyDown: O(e.onKeyDown, (u) => {
      const d = u.currentTarget.contains(u.target), f = q1[c.dir].includes(u.key);
      if (d && f) {
        var m;
        a.onOpenChange(!1), (m = s.trigger) === null || m === void 0 || m.focus(), u.preventDefault();
      }
    })
  })))));
});
function Hd(e) {
  return e ? "open" : "closed";
}
function or(e) {
  return e === "indeterminate";
}
function Ic(e) {
  return or(e) ? "indeterminate" : e ? "checked" : "unchecked";
}
function Cx(e) {
  const t = document.activeElement;
  for (const n of e)
    if (n === t || (n.focus(), document.activeElement !== t))
      return;
}
function Sx(e, t) {
  return e.map(
    (n, o) => e[(t + o) % e.length]
  );
}
function Ex(e, t, n) {
  const r = t.length > 1 && Array.from(t).every(
    (l) => l === t[0]
  ) ? t[0] : t, a = n ? e.indexOf(n) : -1;
  let c = Sx(e, Math.max(a, 0));
  r.length === 1 && (c = c.filter(
    (l) => l !== n
  ));
  const i = c.find(
    (l) => l.toLowerCase().startsWith(r.toLowerCase())
  );
  return i !== n ? i : void 0;
}
function Px(e, t) {
  const { x: n, y: o } = e;
  let r = !1;
  for (let a = 0, c = t.length - 1; a < t.length; c = a++) {
    const s = t[a].x, i = t[a].y, l = t[c].x, u = t[c].y;
    i > o != u > o && n < (l - s) * (o - i) / (u - i) + s && (r = !r);
  }
  return r;
}
function _x(e, t) {
  if (!t)
    return !1;
  const n = {
    x: e.clientX,
    y: e.clientY
  };
  return Px(n, t);
}
function oo(e) {
  return (t) => t.pointerType === "mouse" ? e(t) : void 0;
}
const Oc = ex, kc = Md, Lc = nx, Fc = rx, zc = Od, Vc = sx, Hc = Dc, Bc = ix, Kc = fx, Gc = mx, Uc = vx, Wc = gx, jc = $x, Yc = xx, Xc = yx, Bd = "ContextMenu", [Tx, Y7] = we(Bd, [
  Po
]), ze = Po(), [Nx, Kd] = Tx(Bd), Rx = (e) => {
  const { __scopeContextMenu: t, children: n, onOpenChange: o, dir: r, modal: a = !0 } = e, [c, s] = q(!1), i = ze(t), l = ge(o), u = re((d) => {
    s(d), l(d);
  }, [
    l
  ]);
  return /* @__PURE__ */ v(Nx, {
    scope: t,
    open: c,
    onOpenChange: u,
    modal: a
  }, /* @__PURE__ */ v(Oc, S({}, i, {
    dir: r,
    open: c,
    onOpenChange: u,
    modal: a
  }), n));
}, Ax = "ContextMenuTrigger", Mx = /* @__PURE__ */ _((e, t) => {
  const { __scopeContextMenu: n, disabled: o = !1, ...r } = e, a = Kd(Ax, n), c = ze(n), s = A({
    x: 0,
    y: 0
  }), i = A({
    getBoundingClientRect: () => DOMRect.fromRect({
      width: 0,
      height: 0,
      ...s.current
    })
  }), l = A(0), u = re(
    () => window.clearTimeout(l.current),
    []
  ), d = (f) => {
    s.current = {
      x: f.clientX,
      y: f.clientY
    }, a.onOpenChange(!0);
  };
  return j(
    () => u,
    [
      u
    ]
  ), j(
    () => void (o && u()),
    [
      o,
      u
    ]
  ), /* @__PURE__ */ v(Ge, null, /* @__PURE__ */ v(kc, S({}, c, {
    virtualRef: i
  })), /* @__PURE__ */ v(Z.span, S({
    "data-state": a.open ? "open" : "closed",
    "data-disabled": o ? "" : void 0
  }, r, {
    ref: t,
    style: {
      WebkitTouchCallout: "none",
      ...e.style
    },
    onContextMenu: o ? e.onContextMenu : O(e.onContextMenu, (f) => {
      u(), d(f), f.preventDefault();
    }),
    onPointerDown: o ? e.onPointerDown : O(e.onPointerDown, Ho((f) => {
      u(), l.current = window.setTimeout(
        () => d(f),
        700
      );
    })),
    onPointerMove: o ? e.onPointerMove : O(e.onPointerMove, Ho(u)),
    onPointerCancel: o ? e.onPointerCancel : O(e.onPointerCancel, Ho(u)),
    onPointerUp: o ? e.onPointerUp : O(e.onPointerUp, Ho(u))
  })));
}), Dx = (e) => {
  const { __scopeContextMenu: t, ...n } = e, o = ze(t);
  return /* @__PURE__ */ v(Lc, S({}, o, n));
}, Ix = "ContextMenuContent", Ox = /* @__PURE__ */ _((e, t) => {
  const { __scopeContextMenu: n, ...o } = e, r = Kd(Ix, n), a = ze(n), c = A(!1);
  return /* @__PURE__ */ v(Fc, S({}, a, o, {
    ref: t,
    side: "right",
    sideOffset: 2,
    align: "start",
    onCloseAutoFocus: (s) => {
      var i;
      (i = e.onCloseAutoFocus) === null || i === void 0 || i.call(e, s), !s.defaultPrevented && c.current && s.preventDefault(), c.current = !1;
    },
    onInteractOutside: (s) => {
      var i;
      (i = e.onInteractOutside) === null || i === void 0 || i.call(e, s), !s.defaultPrevented && !r.modal && (c.current = !0);
    },
    style: {
      ...e.style,
      "--radix-context-menu-content-transform-origin": "var(--radix-popper-transform-origin)",
      "--radix-context-menu-content-available-width": "var(--radix-popper-available-width)",
      "--radix-context-menu-content-available-height": "var(--radix-popper-available-height)",
      "--radix-context-menu-trigger-width": "var(--radix-popper-anchor-width)",
      "--radix-context-menu-trigger-height": "var(--radix-popper-anchor-height)"
    }
  }));
}), kx = /* @__PURE__ */ _((e, t) => {
  const { __scopeContextMenu: n, ...o } = e, r = ze(n);
  return /* @__PURE__ */ v(zc, S({}, r, o, {
    ref: t
  }));
}), Lx = /* @__PURE__ */ _((e, t) => {
  const { __scopeContextMenu: n, ...o } = e, r = ze(n);
  return /* @__PURE__ */ v(Vc, S({}, r, o, {
    ref: t
  }));
}), Fx = /* @__PURE__ */ _((e, t) => {
  const { __scopeContextMenu: n, ...o } = e, r = ze(n);
  return /* @__PURE__ */ v(Hc, S({}, r, o, {
    ref: t
  }));
}), zx = /* @__PURE__ */ _((e, t) => {
  const { __scopeContextMenu: n, ...o } = e, r = ze(n);
  return /* @__PURE__ */ v(Bc, S({}, r, o, {
    ref: t
  }));
}), Vx = /* @__PURE__ */ _((e, t) => {
  const { __scopeContextMenu: n, ...o } = e, r = ze(n);
  return /* @__PURE__ */ v(Kc, S({}, r, o, {
    ref: t
  }));
}), Hx = /* @__PURE__ */ _((e, t) => {
  const { __scopeContextMenu: n, ...o } = e, r = ze(n);
  return /* @__PURE__ */ v(Gc, S({}, r, o, {
    ref: t
  }));
}), Bx = /* @__PURE__ */ _((e, t) => {
  const { __scopeContextMenu: n, ...o } = e, r = ze(n);
  return /* @__PURE__ */ v(Uc, S({}, r, o, {
    ref: t
  }));
}), Kx = /* @__PURE__ */ _((e, t) => {
  const { __scopeContextMenu: n, ...o } = e, r = ze(n);
  return /* @__PURE__ */ v(Wc, S({}, r, o, {
    ref: t
  }));
}), Gx = (e) => {
  const { __scopeContextMenu: t, children: n, onOpenChange: o, open: r, defaultOpen: a } = e, c = ze(t), [s, i] = Se({
    prop: r,
    defaultProp: a,
    onChange: o
  });
  return /* @__PURE__ */ v(jc, S({}, c, {
    open: s,
    onOpenChange: i
  }), n);
}, Ux = /* @__PURE__ */ _((e, t) => {
  const { __scopeContextMenu: n, ...o } = e, r = ze(n);
  return /* @__PURE__ */ v(Yc, S({}, r, o, {
    ref: t
  }));
}), Wx = /* @__PURE__ */ _((e, t) => {
  const { __scopeContextMenu: n, ...o } = e, r = ze(n);
  return /* @__PURE__ */ v(Xc, S({}, r, o, {
    ref: t,
    style: {
      ...e.style,
      "--radix-context-menu-content-transform-origin": "var(--radix-popper-transform-origin)",
      "--radix-context-menu-content-available-width": "var(--radix-popper-available-width)",
      "--radix-context-menu-content-available-height": "var(--radix-popper-available-height)",
      "--radix-context-menu-trigger-width": "var(--radix-popper-anchor-width)",
      "--radix-context-menu-trigger-height": "var(--radix-popper-anchor-height)"
    }
  }));
});
function Ho(e) {
  return (t) => t.pointerType !== "mouse" ? e(t) : void 0;
}
const jx = Rx, Yx = Mx, Gd = Dx, Ud = Ox, Xx = kx, Wd = Lx, jd = Fx, Yd = zx, qx = Vx, Xd = Hx, qd = Bx, Zd = Kx, Zx = Gx, Qd = Ux, Jd = Wx, X7 = jx, q7 = Yx, Z7 = Xx, Q7 = Gd, J7 = Zx, eE = qx, Qx = w.forwardRef(({ className: e, inset: t, children: n, ...o }, r) => /* @__PURE__ */ ve(
  Qd,
  {
    ref: r,
    className: M(
      "flex cursor-default select-none items-center rounded-sm px-2 py-1.5 text-sm outline-none focus:bg-accent focus:text-accent-foreground data-[state=open]:bg-accent data-[state=open]:text-accent-foreground",
      t && "pl-8",
      e
    ),
    ...o,
    children: [
      n,
      /* @__PURE__ */ P(br, { className: "ml-auto h-4 w-4" })
    ]
  }
));
Qx.displayName = Qd.displayName;
const Jx = w.forwardRef(({ className: e, ...t }, n) => /* @__PURE__ */ P(
  Jd,
  {
    ref: n,
    className: M(
      "z-50 min-w-[8rem] overflow-hidden rounded-md border bg-popover p-1 text-popover-foreground shadow-md data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",
      e
    ),
    ...t
  }
));
Jx.displayName = Jd.displayName;
const ew = w.forwardRef(({ className: e, ...t }, n) => /* @__PURE__ */ P(Gd, { children: /* @__PURE__ */ P(
  Ud,
  {
    ref: n,
    className: M(
      "z-50 min-w-[8rem] overflow-hidden rounded-md border bg-popover p-1 text-popover-foreground shadow-md animate-in fade-in-80 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",
      e
    ),
    ...t
  }
) }));
ew.displayName = Ud.displayName;
const tw = w.forwardRef(({ className: e, inset: t, ...n }, o) => /* @__PURE__ */ P(
  jd,
  {
    ref: o,
    className: M(
      "relative flex cursor-default select-none items-center rounded-sm px-2 py-1.5 text-sm outline-none focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",
      t && "pl-8",
      e
    ),
    ...n
  }
));
tw.displayName = jd.displayName;
const nw = w.forwardRef(({ className: e, children: t, checked: n, ...o }, r) => /* @__PURE__ */ ve(
  Yd,
  {
    ref: r,
    className: M(
      "relative flex cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",
      e
    ),
    checked: n,
    ...o,
    children: [
      /* @__PURE__ */ P("span", { className: "absolute left-2 flex h-3.5 w-3.5 items-center justify-center", children: /* @__PURE__ */ P(qd, { children: /* @__PURE__ */ P(po, { className: "h-4 w-4" }) }) }),
      t
    ]
  }
));
nw.displayName = Yd.displayName;
const ow = w.forwardRef(({ className: e, children: t, ...n }, o) => /* @__PURE__ */ ve(
  Xd,
  {
    ref: o,
    className: M(
      "relative flex cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",
      e
    ),
    ...n,
    children: [
      /* @__PURE__ */ P("span", { className: "absolute left-2 flex h-3.5 w-3.5 items-center justify-center", children: /* @__PURE__ */ P(qd, { children: /* @__PURE__ */ P(vr, { className: "h-2 w-2 fill-current" }) }) }),
      t
    ]
  }
));
ow.displayName = Xd.displayName;
const rw = w.forwardRef(({ className: e, inset: t, ...n }, o) => /* @__PURE__ */ P(
  Wd,
  {
    ref: o,
    className: M(
      "px-2 py-1.5 text-sm font-semibold text-foreground",
      t && "pl-8",
      e
    ),
    ...n
  }
));
rw.displayName = Wd.displayName;
const aw = w.forwardRef(({ className: e, ...t }, n) => /* @__PURE__ */ P(
  Zd,
  {
    ref: n,
    className: M("-mx-1 my-1 h-px bg-border", e),
    ...t
  }
));
aw.displayName = Zd.displayName;
function cw({
  className: e,
  ...t
}) {
  return /* @__PURE__ */ P(
    "span",
    {
      className: M("ml-auto text-xs tracking-widest text-muted-foreground", e),
      ...t
    }
  );
}
cw.displayName = "ContextMenuShortcut";
var eu = F.createContext({ drawerRef: { current: null }, overlayRef: { current: null }, scaleBackground: () => {
}, onPress: () => {
}, onRelease: () => {
}, onDrag: () => {
}, onNestedDrag: () => {
}, onNestedOpenChange: () => {
}, onNestedRelease: () => {
}, openProp: void 0, dismissible: !1, isOpen: !1, keyboardIsOpen: { current: !1 }, snapPointsOffset: null, snapPoints: null, modal: !1, shouldFade: !1, activeSnapPoint: null, onOpenChange: () => {
}, setActiveSnapPoint: () => {
}, visible: !1, closeDrawer: () => {
}, setVisible: () => {
}, direction: "bottom" }), qc = () => F.useContext(eu);
function sw(e, { insertAt: t } = {}) {
  if (!e || typeof document > "u")
    return;
  let n = document.head || document.getElementsByTagName("head")[0], o = document.createElement("style");
  o.type = "text/css", t === "top" && n.firstChild ? n.insertBefore(o, n.firstChild) : n.appendChild(o), o.styleSheet ? o.styleSheet.cssText = e : o.appendChild(document.createTextNode(e));
}
sw(`[vaul-drawer]{touch-action:none;transition:transform .5s cubic-bezier(.32,.72,0,1)}[vaul-drawer][vaul-drawer-direction=bottom]{transform:translate3d(0,100%,0)}[vaul-drawer][vaul-drawer-direction=top]{transform:translate3d(0,-100%,0)}[vaul-drawer][vaul-drawer-direction=left]{transform:translate3d(-100%,0,0)}[vaul-drawer][vaul-drawer-direction=right]{transform:translate3d(100%,0,0)}.vaul-dragging .vaul-scrollable [vault-drawer-direction=top],.vaul-dragging .vaul-scrollable [vault-drawer-direction=bottom]{overflow-y:hidden!important}.vaul-dragging .vaul-scrollable [vault-drawer-direction=left],.vaul-dragging .vaul-scrollable [vault-drawer-direction=right]{overflow-x:hidden!important}[vaul-drawer][vaul-drawer-visible=true][vaul-drawer-direction=top],[vaul-drawer][vaul-drawer-visible=true][vaul-drawer-direction=bottom]{transform:translate3d(0,var(--snap-point-height, 0),0)}[vaul-drawer][vaul-drawer-visible=true][vaul-drawer-direction=left],[vaul-drawer][vaul-drawer-visible=true][vaul-drawer-direction=right]{transform:translate3d(var(--snap-point-height, 0),0,0)}[vaul-overlay]{opacity:0;transition:opacity .5s cubic-bezier(.32,.72,0,1)}[vaul-overlay][vaul-drawer-visible=true]{opacity:1}[vaul-drawer]:after{content:"";position:absolute;background:inherit;background-color:inherit}[vaul-drawer][vaul-drawer-direction=top]:after{top:initial;bottom:100%;left:0;right:0;height:200%}[vaul-drawer][vaul-drawer-direction=bottom]:after{top:100%;bottom:initial;left:0;right:0;height:200%}[vaul-drawer][vaul-drawer-direction=left]:after{left:initial;right:100%;top:0;bottom:0;width:200%}[vaul-drawer][vaul-drawer-direction=right]:after{left:100%;right:initial;top:0;bottom:0;width:200%}[vaul-overlay][vaul-snap-points=true]:not([vaul-snap-points-overlay="true"]):not([data-state="closed"]){opacity:0}[vaul-overlay][vaul-snap-points-overlay=true]:not([vaul-drawer-visible="false"]){opacity:1}@keyframes fake-animation{}@media (hover: hover) and (pointer: fine){[vaul-drawer]{user-select:none}}
`);
var iw = typeof window < "u" ? dr : j;
function Fa(...e) {
  return (...t) => {
    for (let n of e)
      typeof n == "function" && n(...t);
  };
}
function lw() {
  return Zc(/^Mac/);
}
function dw() {
  return Zc(/^iPhone/);
}
function uw() {
  return Zc(/^iPad/) || lw() && navigator.maxTouchPoints > 1;
}
function tu() {
  return dw() || uw();
}
function Zc(e) {
  return typeof window < "u" && window.navigator != null ? e.test(window.navigator.platform) : void 0;
}
var fa = typeof document < "u" && window.visualViewport;
function si(e) {
  let t = window.getComputedStyle(e);
  return /(auto|scroll)/.test(t.overflow + t.overflowX + t.overflowY);
}
function nu(e) {
  for (si(e) && (e = e.parentElement); e && !si(e); )
    e = e.parentElement;
  return e || document.scrollingElement || document.documentElement;
}
var fw = /* @__PURE__ */ new Set(["checkbox", "radio", "range", "color", "file", "image", "button", "submit", "reset"]), Bo = 0, pa;
function pw(e = {}) {
  let { isDisabled: t } = e;
  iw(() => {
    if (!t)
      return Bo++, Bo === 1 && (tu() ? pa = bw() : pa = mw()), () => {
        Bo--, Bo === 0 && pa();
      };
  }, [t]);
}
function mw() {
  return Fa(ou(document.documentElement, "paddingRight", `${window.innerWidth - document.documentElement.clientWidth}px`));
}
function bw() {
  let e, t = 0, n = (d) => {
    e = nu(d.target), !(e === document.documentElement && e === document.body) && (t = d.changedTouches[0].pageY);
  }, o = (d) => {
    if (!e || e === document.documentElement || e === document.body) {
      d.preventDefault();
      return;
    }
    let f = d.changedTouches[0].pageY, m = e.scrollTop, b = e.scrollHeight - e.clientHeight;
    b !== 0 && ((m <= 0 && f > t || m >= b && f < t) && d.preventDefault(), t = f);
  }, r = (d) => {
    let f = d.target;
    rr(f) && f !== document.activeElement && (d.preventDefault(), f.style.transform = "translateY(-2000px)", f.focus(), requestAnimationFrame(() => {
      f.style.transform = "";
    }));
  }, a = (d) => {
    let f = d.target;
    rr(f) && (f.style.transform = "translateY(-2000px)", requestAnimationFrame(() => {
      f.style.transform = "", fa && (fa.height < window.innerHeight ? requestAnimationFrame(() => {
        ii(f);
      }) : fa.addEventListener("resize", () => ii(f), { once: !0 }));
    }));
  }, c = () => {
    window.scrollTo(0, 0);
  }, s = window.pageXOffset, i = window.pageYOffset, l = Fa(ou(document.documentElement, "paddingRight", `${window.innerWidth - document.documentElement.clientWidth}px`));
  window.scrollTo(0, 0);
  let u = Fa(Hn(document, "touchstart", n, { passive: !1, capture: !0 }), Hn(document, "touchmove", o, { passive: !1, capture: !0 }), Hn(document, "touchend", r, { passive: !1, capture: !0 }), Hn(document, "focus", a, !0), Hn(window, "scroll", c));
  return () => {
    l(), u(), window.scrollTo(s, i);
  };
}
function ou(e, t, n) {
  let o = e.style[t];
  return e.style[t] = n, () => {
    e.style[t] = o;
  };
}
function Hn(e, t, n, o) {
  return e.addEventListener(t, n, o), () => {
    e.removeEventListener(t, n, o);
  };
}
function ii(e) {
  let t = document.scrollingElement || document.documentElement;
  for (; e && e !== t; ) {
    let n = nu(e);
    if (n !== document.documentElement && n !== document.body && n !== e) {
      let o = n.getBoundingClientRect().top, r = e.getBoundingClientRect().top, a = e.getBoundingClientRect().bottom, c = n.getBoundingClientRect().bottom;
      a > c && (n.scrollTop += r - o);
    }
    e = n.parentElement;
  }
}
function rr(e) {
  return e instanceof HTMLInputElement && !fw.has(e.type) || e instanceof HTMLTextAreaElement || e instanceof HTMLElement && e.isContentEditable;
}
function vw(e, t) {
  typeof e == "function" ? e(t) : e != null && (e.current = t);
}
function gw(...e) {
  return (t) => e.forEach((n) => vw(n, t));
}
function ru(...e) {
  return w.useCallback(gw(...e), e);
}
var _t = null;
function hw({ isOpen: e, modal: t, nested: n, hasBeenOpened: o, preventScrollRestoration: r }) {
  let [a, c] = F.useState(typeof window < "u" ? window.location.href : ""), s = F.useRef(0);
  function i() {
    if (_t === null && e) {
      _t = { position: document.body.style.position, top: document.body.style.top, left: document.body.style.left, height: document.body.style.height };
      let { scrollX: u, innerHeight: d } = window;
      document.body.style.setProperty("position", "fixed", "important"), document.body.style.top = `${-s.current}px`, document.body.style.left = `${-u}px`, document.body.style.right = "0px", document.body.style.height = "auto", setTimeout(() => requestAnimationFrame(() => {
        let f = d - window.innerHeight;
        f && s.current >= d && (document.body.style.top = `${-(s.current + f)}px`);
      }), 300);
    }
  }
  function l() {
    if (_t !== null) {
      let u = -parseInt(document.body.style.top, 10), d = -parseInt(document.body.style.left, 10);
      document.body.style.position = _t.position, document.body.style.top = _t.top, document.body.style.left = _t.left, document.body.style.height = _t.height, document.body.style.right = "unset", requestAnimationFrame(() => {
        if (r && a !== window.location.href) {
          c(window.location.href);
          return;
        }
        window.scrollTo(d, u);
      }), _t = null;
    }
  }
  return F.useEffect(() => {
    function u() {
      s.current = window.scrollY;
    }
    return u(), window.addEventListener("scroll", u), () => {
      window.removeEventListener("scroll", u);
    };
  }, []), F.useEffect(() => {
    n || !o || (e ? (i(), t || setTimeout(() => {
      l();
    }, 500)) : l());
  }, [e, o, a]), { restorePositionSetting: l };
}
var au = /* @__PURE__ */ new WeakMap();
function Pe(e, t, n = !1) {
  if (!e || !(e instanceof HTMLElement) || !t)
    return;
  let o = {};
  Object.entries(t).forEach(([r, a]) => {
    if (r.startsWith("--")) {
      e.style.setProperty(r, a);
      return;
    }
    o[r] = e.style[r], e.style[r] = a;
  }), !n && au.set(e, o);
}
function Bn(e, t) {
  if (!e || !(e instanceof HTMLElement))
    return;
  let n = au.get(e);
  n && (t ? e.style[t] = n[t] : Object.entries(n).forEach(([o, r]) => {
    e.style[o] = r;
  }));
}
var Ie = (e) => {
  switch (e) {
    case "top":
    case "bottom":
      return !0;
    case "left":
    case "right":
      return !1;
    default:
      return e;
  }
};
function Ko(e, t) {
  let n = window.getComputedStyle(e), o = n.transform || n.webkitTransform || n.mozTransform, r = o.match(/^matrix3d\((.+)\)$/);
  return r ? parseFloat(r[1].split(", ")[Ie(t) ? 13 : 12]) : (r = o.match(/^matrix\((.+)\)$/), r ? parseFloat(r[1].split(", ")[Ie(t) ? 5 : 4]) : null);
}
function $w(e) {
  return 8 * (Math.log(e + 1) - 2);
}
var xe = { DURATION: 0.5, EASE: [0.32, 0.72, 0, 1] }, cu = 0.4;
function su(e) {
  let t = F.useRef(e);
  return F.useEffect(() => {
    t.current = e;
  }), F.useMemo(() => (...n) => {
    var o;
    return (o = t.current) == null ? void 0 : o.call(t, ...n);
  }, []);
}
function xw({ defaultProp: e, onChange: t }) {
  let n = F.useState(e), [o] = n, r = F.useRef(o), a = su(t);
  return F.useEffect(() => {
    r.current !== o && (a(o), r.current = o);
  }, [o, r, a]), n;
}
function ww({ prop: e, defaultProp: t, onChange: n = () => {
} }) {
  let [o, r] = xw({ defaultProp: t, onChange: n }), a = e !== void 0, c = a ? e : o, s = su(n), i = F.useCallback((l) => {
    if (a) {
      let u = typeof l == "function" ? l(e) : l;
      u !== e && s(u);
    } else
      r(l);
  }, [a, e, r, s]);
  return [c, i];
}
function yw({ activeSnapPointProp: e, setActiveSnapPointProp: t, snapPoints: n, drawerRef: o, overlayRef: r, fadeFromIndex: a, onSnapPointChange: c, direction: s = "bottom" }) {
  let [i, l] = ww({ prop: e, defaultProp: n == null ? void 0 : n[0], onChange: t }), u = F.useMemo(() => i === (n == null ? void 0 : n[n.length - 1]), [n, i]), d = n && n.length > 0 && (a || a === 0) && !Number.isNaN(a) && n[a] === i || !n, f = F.useMemo(() => {
    var x;
    return (x = n == null ? void 0 : n.findIndex((C) => C === i)) != null ? x : null;
  }, [n, i]), m = F.useMemo(() => {
    var x;
    return (x = n == null ? void 0 : n.map((C) => {
      let y = typeof window < "u", E = typeof C == "string", T = 0;
      if (E && (T = parseInt(C, 10)), Ie(s)) {
        let N = E ? T : y ? C * window.innerHeight : 0;
        return y ? s === "bottom" ? window.innerHeight - N : -window.innerHeight + N : N;
      }
      let R = E ? T : y ? C * window.innerWidth : 0;
      return y ? s === "right" ? window.innerWidth - R : -window.innerWidth + R : R;
    })) != null ? x : [];
  }, [n]), b = F.useMemo(() => f !== null ? m == null ? void 0 : m[f] : null, [m, f]), p = F.useCallback((x) => {
    var C;
    let y = (C = m == null ? void 0 : m.findIndex((E) => E === x)) != null ? C : null;
    c(y), Pe(o.current, { transition: `transform ${xe.DURATION}s cubic-bezier(${xe.EASE.join(",")})`, transform: Ie(s) ? `translate3d(0, ${x}px, 0)` : `translate3d(${x}px, 0, 0)` }), m && y !== m.length - 1 && y !== a ? Pe(r.current, { transition: `opacity ${xe.DURATION}s cubic-bezier(${xe.EASE.join(",")})`, opacity: "0" }) : Pe(r.current, { transition: `opacity ${xe.DURATION}s cubic-bezier(${xe.EASE.join(",")})`, opacity: "1" }), l(y !== null ? n == null ? void 0 : n[y] : null);
  }, [o.current, n, m, a, r, l]);
  F.useEffect(() => {
    var x;
    if (e) {
      let C = (x = n == null ? void 0 : n.findIndex((y) => y === e)) != null ? x : null;
      m && C && typeof m[C] == "number" && p(m[C]);
    }
  }, [e, n, m, p]);
  function g({ draggedDistance: x, closeDrawer: C, velocity: y, dismissible: E }) {
    if (a === void 0)
      return;
    let T = s === "bottom" || s === "right" ? b ?? 0 - x : b ?? 0 + x, R = f === a - 1, N = f === 0, H = x > 0;
    if (R && Pe(r.current, { transition: `opacity ${xe.DURATION}s cubic-bezier(${xe.EASE.join(",")})` }), y > 2 && !H) {
      E ? C() : p(m[0]);
      return;
    }
    if (y > 2 && H && m && n) {
      p(m[n.length - 1]);
      return;
    }
    let K = m == null ? void 0 : m.reduce((Q, D) => typeof Q != "number" || typeof D != "number" ? Q : Math.abs(D - T) < Math.abs(Q - T) ? D : Q), I = Ie(s) ? window.innerHeight : window.innerWidth;
    if (y > cu && Math.abs(x) < I * 0.4) {
      let Q = H ? 1 : -1;
      if (Q > 0 && u) {
        p(m[n.length - 1]);
        return;
      }
      if (N && Q < 0 && E && C(), f === null)
        return;
      p(m[f + Q]);
      return;
    }
    p(K);
  }
  function h({ draggedDistance: x }) {
    if (b === null)
      return;
    let C = s === "bottom" || s === "right" ? b - x : b + x;
    (s === "bottom" || s === "right") && C < m[m.length - 1] || (s === "top" || s === "left") && C > m[m.length - 1] || Pe(o.current, { transform: Ie(s) ? `translate3d(0, ${C}px, 0)` : `translate3d(${C}px, 0, 0)` });
  }
  function $(x, C) {
    if (!n || typeof f != "number" || !m || a === void 0)
      return null;
    let y = f === a - 1;
    if (f >= a && C)
      return 0;
    if (y && !C)
      return 1;
    if (!d && !y)
      return null;
    let E = y ? f + 1 : f - 1, T = y ? m[E] - m[E - 1] : m[E + 1] - m[E], R = x / Math.abs(T);
    return y ? 1 - R : R;
  }
  return { isLastSnapPoint: u, activeSnapPoint: i, shouldFade: d, getPercentageDragged: $, setActiveSnapPoint: l, activeSnapPointIndex: f, onRelease: g, onDrag: h, snapPointsOffset: m };
}
var Cw = 0.25, Sw = 100, li = 8, Ht = 16, di = 26, ui = "vaul-dragging";
function iu({ open: e, onOpenChange: t, children: n, shouldScaleBackground: o, onDrag: r, onRelease: a, snapPoints: c, nested: s = !1, closeThreshold: i = Cw, scrollLockTimeout: l = Sw, dismissible: u = !0, fadeFromIndex: d = c && c.length - 1, activeSnapPoint: f, setActiveSnapPoint: m, fixed: b, modal: p = !0, onClose: g, direction: h = "bottom", preventScrollRestoration: $ = !0 }) {
  var x;
  let [C = !1, y] = F.useState(!1), [E, T] = F.useState(!1), [R, N] = F.useState(!1), [H, K] = F.useState(!1), [I, Q] = F.useState(!1), [D, V] = F.useState(!1), J = F.useRef(null), oe = F.useRef(null), se = F.useRef(null), Y = F.useRef(null), k = F.useRef(null), W = F.useRef(!1), L = F.useRef(null), z = F.useRef(0), X = F.useRef(!1), ee = F.useRef(0), B = F.useRef(null), U = F.useRef(((x = B.current) == null ? void 0 : x.getBoundingClientRect().height) || 0), te = F.useRef(0), ce = F.useCallback((le) => {
    c && le === ue.length - 1 && (oe.current = /* @__PURE__ */ new Date());
  }, []), { activeSnapPoint: ie, activeSnapPointIndex: ne, setActiveSnapPoint: G, onRelease: de, snapPointsOffset: ue, onDrag: fe, shouldFade: Te, getPercentageDragged: De } = yw({ snapPoints: c, activeSnapPointProp: f, setActiveSnapPointProp: m, drawerRef: B, fadeFromIndex: d, overlayRef: J, onSnapPointChange: ce, direction: h });
  pw({ isDisabled: !C || I || !p || D || !E });
  let { restorePositionSetting: Oe } = hw({ isOpen: C, modal: p, nested: s, hasBeenOpened: E, preventScrollRestoration: $ });
  function Ae() {
    return (window.innerWidth - di) / window.innerWidth;
  }
  function et(le) {
    var me;
    !u && !c || B.current && !B.current.contains(le.target) || (U.current = ((me = B.current) == null ? void 0 : me.getBoundingClientRect().height) || 0, Q(!0), se.current = /* @__PURE__ */ new Date(), tu() && window.addEventListener("touchend", () => W.current = !1, { once: !0 }), le.target.setPointerCapture(le.pointerId), z.current = Ie(h) ? le.screenY : le.screenX);
  }
  function tt(le, me) {
    var he;
    let $e = le, ye = (he = window.getSelection()) == null ? void 0 : he.toString(), Ne = B.current ? Ko(B.current, h) : null, ke = /* @__PURE__ */ new Date();
    if (oe.current && ke.getTime() - oe.current.getTime() < 500)
      return !1;
    if (Ne !== null && (h === "bottom" || h === "right" ? Ne > 0 : Ne < 0))
      return !0;
    if (ye && ye.length > 0)
      return !1;
    if (k.current && ke.getTime() - k.current.getTime() < l && Ne === 0 || me)
      return k.current = ke, !1;
    for (; $e; ) {
      if ($e.scrollHeight > $e.clientHeight) {
        if ($e.scrollTop !== 0)
          return k.current = /* @__PURE__ */ new Date(), !1;
        if ($e.getAttribute("role") === "dialog")
          return !0;
      }
      $e = $e.parentNode;
    }
    return !0;
  }
  function In(le) {
    if (B.current && I) {
      let me = h === "bottom" || h === "right" ? 1 : -1, he = (z.current - (Ie(h) ? le.screenY : le.screenX)) * me, $e = he > 0;
      if (c && ne === 0 && !u || !W.current && !tt(le.target, $e))
        return;
      if (B.current.classList.add(ui), W.current = !0, Pe(B.current, { transition: "none" }), Pe(J.current, { transition: "none" }), c && fe({ draggedDistance: he }), $e && !c) {
        let qe = $w(he), Vt = Math.min(qe * -1, 0) * me;
        Pe(B.current, { transform: Ie(h) ? `translate3d(0, ${Vt}px, 0)` : `translate3d(${Vt}px, 0, 0)` });
        return;
      }
      let ye = Math.abs(he), Ne = document.querySelector("[vaul-drawer-wrapper]"), ke = ye / U.current, zt = De(ye, $e);
      zt !== null && (ke = zt);
      let pt = 1 - ke;
      if ((Te || d && ne === d - 1) && (r == null || r(le, ke), Pe(J.current, { opacity: `${pt}`, transition: "none" }, !0)), Ne && J.current && o) {
        let qe = Math.min(Ae() + ke * (1 - Ae()), 1), Vt = 8 - ke * 8, Ln = Math.max(0, 14 - ke * 14);
        Pe(Ne, { borderRadius: `${Vt}px`, transform: Ie(h) ? `scale(${qe}) translate3d(0, ${Ln}px, 0)` : `scale(${qe}) translate3d(${Ln}px, 0, 0)`, transition: "none" }, !0);
      }
      if (!c) {
        let qe = ye * me;
        Pe(B.current, { transform: Ie(h) ? `translate3d(0, ${qe}px, 0)` : `translate3d(${qe}px, 0, 0)` });
      }
    }
  }
  F.useEffect(() => () => {
    Ft(!1), Oe();
  }, []), F.useEffect(() => {
    var le;
    function me() {
      var he;
      if (!B.current)
        return;
      let $e = document.activeElement;
      if (rr($e) || X.current) {
        let ye = ((he = window.visualViewport) == null ? void 0 : he.height) || 0, Ne = window.innerHeight - ye, ke = B.current.getBoundingClientRect().height || 0;
        te.current || (te.current = ke);
        let zt = B.current.getBoundingClientRect().top;
        if (Math.abs(ee.current - Ne) > 60 && (X.current = !X.current), c && c.length > 0 && ue && ne) {
          let pt = ue[ne] || 0;
          Ne += pt;
        }
        if (ee.current = Ne, ke > ye || X.current) {
          let pt = B.current.getBoundingClientRect().height, qe = pt;
          pt > ye && (qe = ye - di), b ? B.current.style.height = `${pt - Math.max(Ne, 0)}px` : B.current.style.height = `${Math.max(qe, ye - zt)}px`;
        } else
          B.current.style.height = `${te.current}px`;
        c && c.length > 0 && !X.current ? B.current.style.bottom = "0px" : B.current.style.bottom = `${Math.max(Ne, 0)}px`;
      }
    }
    return (le = window.visualViewport) == null || le.addEventListener("resize", me), () => {
      var he;
      return (he = window.visualViewport) == null ? void 0 : he.removeEventListener("resize", me);
    };
  }, [ne, c, ue]);
  function ut() {
    B.current && (g == null || g(), Pe(B.current, { transform: Ie(h) ? `translate3d(0, ${h === "bottom" ? "100%" : "-100%"}, 0)` : `translate3d(${h === "right" ? "100%" : "-100%"}, 0, 0)`, transition: `transform ${xe.DURATION}s cubic-bezier(${xe.EASE.join(",")})` }), Pe(J.current, { opacity: "0", transition: `opacity ${xe.DURATION}s cubic-bezier(${xe.EASE.join(",")})` }), Ft(!1), setTimeout(() => {
      N(!1), y(!1);
    }, 300), setTimeout(() => {
      Bn(document.documentElement, "scrollBehavior"), c && G(c[0]);
    }, xe.DURATION * 1e3));
  }
  F.useEffect(() => {
    if (!C && o) {
      let le = setTimeout(() => {
        Bn(document.body);
      }, 200);
      return () => clearTimeout(le);
    }
  }, [C, o]), F.useEffect(() => {
    e ? (y(!0), T(!0)) : ut();
  }, [e]), F.useEffect(() => {
    H && (t == null || t(C));
  }, [C]), F.useEffect(() => {
    K(!0);
  }, []);
  function On() {
    if (!B.current)
      return;
    let le = document.querySelector("[vaul-drawer-wrapper]"), me = Ko(B.current, h);
    Pe(B.current, { transform: "translate3d(0, 0, 0)", transition: `transform ${xe.DURATION}s cubic-bezier(${xe.EASE.join(",")})` }), Pe(J.current, { transition: `opacity ${xe.DURATION}s cubic-bezier(${xe.EASE.join(",")})`, opacity: "1" }), o && me && me > 0 && C && Pe(le, { borderRadius: `${li}px`, overflow: "hidden", ...Ie(h) ? { transform: `scale(${Ae()}) translate3d(0, calc(env(safe-area-inset-top) + 14px), 0)`, transformOrigin: "top" } : { transform: `scale(${Ae()}) translate3d(calc(env(safe-area-inset-top) + 14px), 0, 0)`, transformOrigin: "left" }, transitionProperty: "transform, border-radius", transitionDuration: `${xe.DURATION}s`, transitionTimingFunction: `cubic-bezier(${xe.EASE.join(",")})` }, !0);
  }
  function Yr(le) {
    var me;
    if (!I || !B.current)
      return;
    W.current && rr(le.target) && le.target.blur(), B.current.classList.remove(ui), W.current = !1, Q(!1), Y.current = /* @__PURE__ */ new Date();
    let he = Ko(B.current, h);
    if (!tt(le.target, !1) || !he || Number.isNaN(he) || se.current === null)
      return;
    let $e = Y.current.getTime() - se.current.getTime(), ye = z.current - (Ie(h) ? le.screenY : le.screenX), Ne = Math.abs(ye) / $e;
    if (Ne > 0.05 && (V(!0), setTimeout(() => {
      V(!1);
    }, 200)), c) {
      de({ draggedDistance: ye * (h === "bottom" || h === "right" ? 1 : -1), closeDrawer: ut, velocity: Ne, dismissible: u }), a == null || a(le, !0);
      return;
    }
    if (h === "bottom" || h === "right" ? ye > 0 : ye < 0) {
      On(), a == null || a(le, !0);
      return;
    }
    if (Ne > cu) {
      ut(), a == null || a(le, !1);
      return;
    }
    let ke = Math.min((me = B.current.getBoundingClientRect().height) != null ? me : 0, window.innerHeight);
    if (he >= ke * i) {
      ut(), a == null || a(le, !1);
      return;
    }
    a == null || a(le, !0), On();
  }
  F.useEffect(() => {
    C && (Pe(document.documentElement, { scrollBehavior: "auto" }), oe.current = /* @__PURE__ */ new Date(), Ft(!0));
  }, [C]), F.useEffect(() => {
    var le;
    if (B.current && R) {
      let me = (le = B == null ? void 0 : B.current) == null ? void 0 : le.querySelectorAll("*");
      me == null || me.forEach((he) => {
        let $e = he;
        ($e.scrollHeight > $e.clientHeight || $e.scrollWidth > $e.clientWidth) && $e.classList.add("vaul-scrollable");
      });
    }
  }, [R]);
  function Ft(le) {
    let me = document.querySelector("[vaul-drawer-wrapper]");
    !me || !o || (le ? (Pe(document.body, { background: "black" }, !0), Pe(me, { borderRadius: `${li}px`, overflow: "hidden", ...Ie(h) ? { transform: `scale(${Ae()}) translate3d(0, calc(env(safe-area-inset-top) + 14px), 0)`, transformOrigin: "top" } : { transform: `scale(${Ae()}) translate3d(calc(env(safe-area-inset-top) + 14px), 0, 0)`, transformOrigin: "left" }, transitionProperty: "transform, border-radius", transitionDuration: `${xe.DURATION}s`, transitionTimingFunction: `cubic-bezier(${xe.EASE.join(",")})` })) : (Bn(me, "overflow"), Bn(me, "transform"), Bn(me, "borderRadius"), Pe(me, { transitionProperty: "transform, border-radius", transitionDuration: `${xe.DURATION}s`, transitionTimingFunction: `cubic-bezier(${xe.EASE.join(",")})` })));
  }
  function Xr(le) {
    let me = le ? (window.innerWidth - Ht) / window.innerWidth : 1, he = le ? -Ht : 0;
    L.current && window.clearTimeout(L.current), Pe(B.current, { transition: `transform ${xe.DURATION}s cubic-bezier(${xe.EASE.join(",")})`, transform: `scale(${me}) translate3d(0, ${he}px, 0)` }), !le && B.current && (L.current = setTimeout(() => {
      let $e = Ko(B.current, h);
      Pe(B.current, { transition: "none", transform: Ie(h) ? `translate3d(0, ${$e}px, 0)` : `translate3d(${$e}px, 0, 0)` });
    }, 500));
  }
  function kn(le, me) {
    if (me < 0)
      return;
    let he = Ie(h) ? window.innerHeight : window.innerWidth, $e = (he - Ht) / he, ye = $e + me * (1 - $e), Ne = -Ht + me * Ht;
    Pe(B.current, { transform: Ie(h) ? `scale(${ye}) translate3d(0, ${Ne}px, 0)` : `scale(${ye}) translate3d(${Ne}px, 0, 0)`, transition: "none" });
  }
  function ft(le, me) {
    let he = Ie(h) ? window.innerHeight : window.innerWidth, $e = me ? (he - Ht) / he : 1, ye = me ? -Ht : 0;
    me && Pe(B.current, { transition: `transform ${xe.DURATION}s cubic-bezier(${xe.EASE.join(",")})`, transform: Ie(h) ? `scale(${$e}) translate3d(0, ${ye}px, 0)` : `scale(${$e}) translate3d(${ye}px, 0, 0)` });
  }
  return F.createElement(wr, { modal: p, onOpenChange: (le) => {
    if (e !== void 0) {
      t == null || t(le);
      return;
    }
    le ? (T(!0), y(le)) : ut();
  }, open: C }, F.createElement(eu.Provider, { value: { visible: R, activeSnapPoint: ie, snapPoints: c, setActiveSnapPoint: G, drawerRef: B, overlayRef: J, scaleBackground: Ft, onOpenChange: t, onPress: et, setVisible: N, onRelease: Yr, onDrag: In, dismissible: u, isOpen: C, shouldFade: Te, closeDrawer: ut, onNestedDrag: kn, onNestedOpenChange: Xr, onNestedRelease: ft, keyboardIsOpen: X, openProp: e, modal: p, snapPointsOffset: ue, direction: h } }, n));
}
var lu = F.forwardRef(function({ children: e, ...t }, n) {
  let { overlayRef: o, snapPoints: r, onRelease: a, shouldFade: c, isOpen: s, visible: i } = qc(), l = ru(n, o), u = r && r.length > 0;
  return F.createElement(Cn, { onMouseUp: a, ref: l, "vaul-drawer-visible": i ? "true" : "false", "vaul-overlay": "", "vaul-snap-points": s && u ? "true" : "false", "vaul-snap-points-overlay": s && c ? "true" : "false", ...t });
});
lu.displayName = "Drawer.Overlay";
var du = F.forwardRef(function({ onOpenAutoFocus: e, onPointerDownOutside: t, onAnimationEnd: n, style: o, ...r }, a) {
  let { drawerRef: c, onPress: s, onRelease: i, onDrag: l, dismissible: u, keyboardIsOpen: d, snapPointsOffset: f, visible: m, closeDrawer: b, modal: p, openProp: g, onOpenChange: h, setVisible: $, direction: x } = qc(), C = ru(a, c);
  return F.useEffect(() => {
    $(!0);
  }, []), F.createElement(Sn, { onOpenAutoFocus: (y) => {
    var E;
    e ? e(y) : (y.preventDefault(), (E = c.current) == null || E.focus());
  }, onPointerDown: s, onPointerDownOutside: (y) => {
    if (t == null || t(y), !p) {
      y.preventDefault();
      return;
    }
    d.current && (d.current = !1), y.preventDefault(), h == null || h(!1), !(!u || g !== void 0) && b();
  }, onPointerMove: l, onPointerUp: i, ref: C, style: f && f.length > 0 ? { "--snap-point-height": `${f[0]}px`, ...o } : o, ...r, "vaul-drawer": "", "vaul-drawer-direction": x, "vaul-drawer-visible": m ? "true" : "false" });
});
du.displayName = "Drawer.Content";
function Ew({ onDrag: e, onOpenChange: t, ...n }) {
  let { onNestedDrag: o, onNestedOpenChange: r, onNestedRelease: a } = qc();
  if (!o)
    throw new Error("Drawer.NestedRoot must be placed in another drawer");
  return F.createElement(iu, { nested: !0, onClose: () => {
    r(!1);
  }, onDrag: (c, s) => {
    o(c, s), e == null || e(c, s);
  }, onOpenChange: (c) => {
    c && r(c), t == null || t(c);
  }, onRelease: a, ...n });
}
var ct = { Root: iu, NestedRoot: Ew, Content: du, Overlay: lu, Trigger: yr, Portal: Cr, Close: Jt, Title: En, Description: Pn };
function Pw({
  shouldScaleBackground: e = !0,
  ...t
}) {
  return /* @__PURE__ */ P(ct.Root, { shouldScaleBackground: e, ...t });
}
Pw.displayName = "Drawer";
const tE = ct.Trigger, _w = ct.Portal, nE = ct.Close, uu = w.forwardRef(({ className: e, ...t }, n) => /* @__PURE__ */ P(
  ct.Overlay,
  {
    ref: n,
    className: M("fixed inset-0 z-50 bg-black/80", e),
    ...t
  }
));
uu.displayName = ct.Overlay.displayName;
const Tw = w.forwardRef(({ className: e, children: t, ...n }, o) => /* @__PURE__ */ ve(_w, { children: [
  /* @__PURE__ */ P(uu, {}),
  /* @__PURE__ */ ve(
    ct.Content,
    {
      ref: o,
      className: M(
        "fixed inset-x-0 bottom-0 z-50 mt-24 flex h-auto flex-col rounded-t-[10px] border bg-background",
        e
      ),
      ...n,
      children: [
        /* @__PURE__ */ P("div", { className: "mx-auto mt-4 h-2 w-[100px] rounded-full bg-muted" }),
        t
      ]
    }
  )
] }));
Tw.displayName = "DrawerContent";
function Nw({
  className: e,
  ...t
}) {
  return /* @__PURE__ */ P(
    "div",
    {
      className: M("grid gap-1.5 p-4 text-center sm:text-left", e),
      ...t
    }
  );
}
Nw.displayName = "DrawerHeader";
function Rw({
  className: e,
  ...t
}) {
  return /* @__PURE__ */ P("div", { className: M("mt-auto flex flex-col gap-2 p-4", e), ...t });
}
Rw.displayName = "DrawerFooter";
const Aw = w.forwardRef(({ className: e, ...t }, n) => /* @__PURE__ */ P(
  ct.Title,
  {
    ref: n,
    className: M("text-lg font-semibold leading-none tracking-tight", e),
    ...t
  }
));
Aw.displayName = ct.Title.displayName;
const Mw = w.forwardRef(({ className: e, ...t }, n) => /* @__PURE__ */ P(
  ct.Description,
  {
    ref: n,
    className: M("text-sm text-muted-foreground", e),
    ...t
  }
));
Mw.displayName = ct.Description.displayName;
const fu = "DropdownMenu", [Dw, oE] = we(fu, [
  Po
]), Ve = Po(), [Iw, pu] = Dw(fu), Ow = (e) => {
  const { __scopeDropdownMenu: t, children: n, dir: o, open: r, defaultOpen: a, onOpenChange: c, modal: s = !0 } = e, i = Ve(t), l = A(null), [u = !1, d] = Se({
    prop: r,
    defaultProp: a,
    onChange: c
  });
  return /* @__PURE__ */ v(Iw, {
    scope: t,
    triggerId: Me(),
    triggerRef: l,
    contentId: Me(),
    open: u,
    onOpenChange: d,
    onOpenToggle: re(
      () => d(
        (f) => !f
      ),
      [
        d
      ]
    ),
    modal: s
  }, /* @__PURE__ */ v(Oc, S({}, i, {
    open: u,
    onOpenChange: d,
    dir: o,
    modal: s
  }), n));
}, kw = "DropdownMenuTrigger", Lw = /* @__PURE__ */ _((e, t) => {
  const { __scopeDropdownMenu: n, disabled: o = !1, ...r } = e, a = pu(kw, n), c = Ve(n);
  return /* @__PURE__ */ v(kc, S({
    asChild: !0
  }, c), /* @__PURE__ */ v(Z.button, S({
    type: "button",
    id: a.triggerId,
    "aria-haspopup": "menu",
    "aria-expanded": a.open,
    "aria-controls": a.open ? a.contentId : void 0,
    "data-state": a.open ? "open" : "closed",
    "data-disabled": o ? "" : void 0,
    disabled: o
  }, r, {
    ref: fo(t, a.triggerRef),
    onPointerDown: O(e.onPointerDown, (s) => {
      !o && s.button === 0 && s.ctrlKey === !1 && (a.onOpenToggle(), a.open || s.preventDefault());
    }),
    onKeyDown: O(e.onKeyDown, (s) => {
      o || ([
        "Enter",
        " "
      ].includes(s.key) && a.onOpenToggle(), s.key === "ArrowDown" && a.onOpenChange(!0), [
        "Enter",
        " ",
        "ArrowDown"
      ].includes(s.key) && s.preventDefault());
    })
  })));
}), Fw = (e) => {
  const { __scopeDropdownMenu: t, ...n } = e, o = Ve(t);
  return /* @__PURE__ */ v(Lc, S({}, o, n));
}, zw = "DropdownMenuContent", Vw = /* @__PURE__ */ _((e, t) => {
  const { __scopeDropdownMenu: n, ...o } = e, r = pu(zw, n), a = Ve(n), c = A(!1);
  return /* @__PURE__ */ v(Fc, S({
    id: r.contentId,
    "aria-labelledby": r.triggerId
  }, a, o, {
    ref: t,
    onCloseAutoFocus: O(e.onCloseAutoFocus, (s) => {
      var i;
      c.current || (i = r.triggerRef.current) === null || i === void 0 || i.focus(), c.current = !1, s.preventDefault();
    }),
    onInteractOutside: O(e.onInteractOutside, (s) => {
      const i = s.detail.originalEvent, l = i.button === 0 && i.ctrlKey === !0, u = i.button === 2 || l;
      (!r.modal || u) && (c.current = !0);
    }),
    style: {
      ...e.style,
      "--radix-dropdown-menu-content-transform-origin": "var(--radix-popper-transform-origin)",
      "--radix-dropdown-menu-content-available-width": "var(--radix-popper-available-width)",
      "--radix-dropdown-menu-content-available-height": "var(--radix-popper-available-height)",
      "--radix-dropdown-menu-trigger-width": "var(--radix-popper-anchor-width)",
      "--radix-dropdown-menu-trigger-height": "var(--radix-popper-anchor-height)"
    }
  }));
}), Hw = /* @__PURE__ */ _((e, t) => {
  const { __scopeDropdownMenu: n, ...o } = e, r = Ve(n);
  return /* @__PURE__ */ v(zc, S({}, r, o, {
    ref: t
  }));
}), Bw = /* @__PURE__ */ _((e, t) => {
  const { __scopeDropdownMenu: n, ...o } = e, r = Ve(n);
  return /* @__PURE__ */ v(Vc, S({}, r, o, {
    ref: t
  }));
}), Kw = /* @__PURE__ */ _((e, t) => {
  const { __scopeDropdownMenu: n, ...o } = e, r = Ve(n);
  return /* @__PURE__ */ v(Hc, S({}, r, o, {
    ref: t
  }));
}), Gw = /* @__PURE__ */ _((e, t) => {
  const { __scopeDropdownMenu: n, ...o } = e, r = Ve(n);
  return /* @__PURE__ */ v(Bc, S({}, r, o, {
    ref: t
  }));
}), Uw = /* @__PURE__ */ _((e, t) => {
  const { __scopeDropdownMenu: n, ...o } = e, r = Ve(n);
  return /* @__PURE__ */ v(Kc, S({}, r, o, {
    ref: t
  }));
}), Ww = /* @__PURE__ */ _((e, t) => {
  const { __scopeDropdownMenu: n, ...o } = e, r = Ve(n);
  return /* @__PURE__ */ v(Gc, S({}, r, o, {
    ref: t
  }));
}), jw = /* @__PURE__ */ _((e, t) => {
  const { __scopeDropdownMenu: n, ...o } = e, r = Ve(n);
  return /* @__PURE__ */ v(Uc, S({}, r, o, {
    ref: t
  }));
}), Yw = /* @__PURE__ */ _((e, t) => {
  const { __scopeDropdownMenu: n, ...o } = e, r = Ve(n);
  return /* @__PURE__ */ v(Wc, S({}, r, o, {
    ref: t
  }));
}), Xw = (e) => {
  const { __scopeDropdownMenu: t, children: n, open: o, onOpenChange: r, defaultOpen: a } = e, c = Ve(t), [s = !1, i] = Se({
    prop: o,
    defaultProp: a,
    onChange: r
  });
  return /* @__PURE__ */ v(jc, S({}, c, {
    open: s,
    onOpenChange: i
  }), n);
}, qw = /* @__PURE__ */ _((e, t) => {
  const { __scopeDropdownMenu: n, ...o } = e, r = Ve(n);
  return /* @__PURE__ */ v(Yc, S({}, r, o, {
    ref: t
  }));
}), Zw = /* @__PURE__ */ _((e, t) => {
  const { __scopeDropdownMenu: n, ...o } = e, r = Ve(n);
  return /* @__PURE__ */ v(Xc, S({}, r, o, {
    ref: t,
    style: {
      ...e.style,
      "--radix-dropdown-menu-content-transform-origin": "var(--radix-popper-transform-origin)",
      "--radix-dropdown-menu-content-available-width": "var(--radix-popper-available-width)",
      "--radix-dropdown-menu-content-available-height": "var(--radix-popper-available-height)",
      "--radix-dropdown-menu-trigger-width": "var(--radix-popper-anchor-width)",
      "--radix-dropdown-menu-trigger-height": "var(--radix-popper-anchor-height)"
    }
  }));
}), Qw = Ow, Jw = Lw, mu = Fw, bu = Vw, ey = Hw, vu = Bw, gu = Kw, hu = Gw, ty = Uw, $u = Ww, xu = jw, wu = Yw, ny = Xw, yu = qw, Cu = Zw, rE = Qw, aE = Jw, cE = ey, sE = mu, iE = ny, lE = ty, oy = w.forwardRef(({ className: e, inset: t, children: n, ...o }, r) => /* @__PURE__ */ ve(
  yu,
  {
    ref: r,
    className: M(
      "flex cursor-default select-none items-center rounded-sm px-2 py-1.5 text-sm outline-none focus:bg-accent data-[state=open]:bg-accent",
      t && "pl-8",
      e
    ),
    ...o,
    children: [
      n,
      /* @__PURE__ */ P(br, { className: "ml-auto h-4 w-4" })
    ]
  }
));
oy.displayName = yu.displayName;
const ry = w.forwardRef(({ className: e, ...t }, n) => /* @__PURE__ */ P(
  Cu,
  {
    ref: n,
    className: M(
      "z-50 min-w-[8rem] overflow-hidden rounded-md border bg-popover p-1 text-popover-foreground shadow-lg data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",
      e
    ),
    ...t
  }
));
ry.displayName = Cu.displayName;
const ay = w.forwardRef(({ className: e, sideOffset: t = 4, ...n }, o) => /* @__PURE__ */ P(mu, { children: /* @__PURE__ */ P(
  bu,
  {
    ref: o,
    sideOffset: t,
    className: M(
      "z-50 min-w-[8rem] overflow-hidden rounded-md border bg-popover p-1 text-popover-foreground shadow-md data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",
      e
    ),
    ...n
  }
) }));
ay.displayName = bu.displayName;
const cy = w.forwardRef(({ className: e, inset: t, ...n }, o) => /* @__PURE__ */ P(
  gu,
  {
    ref: o,
    className: M(
      "relative flex cursor-default select-none items-center rounded-sm px-2 py-1.5 text-sm outline-none transition-colors focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",
      t && "pl-8",
      e
    ),
    ...n
  }
));
cy.displayName = gu.displayName;
const sy = w.forwardRef(({ className: e, children: t, checked: n, ...o }, r) => /* @__PURE__ */ ve(
  hu,
  {
    ref: r,
    className: M(
      "relative flex cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none transition-colors focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",
      e
    ),
    checked: n,
    ...o,
    children: [
      /* @__PURE__ */ P("span", { className: "absolute left-2 flex h-3.5 w-3.5 items-center justify-center", children: /* @__PURE__ */ P(xu, { children: /* @__PURE__ */ P(po, { className: "h-4 w-4" }) }) }),
      t
    ]
  }
));
sy.displayName = hu.displayName;
const iy = w.forwardRef(({ className: e, children: t, ...n }, o) => /* @__PURE__ */ ve(
  $u,
  {
    ref: o,
    className: M(
      "relative flex cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none transition-colors focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",
      e
    ),
    ...n,
    children: [
      /* @__PURE__ */ P("span", { className: "absolute left-2 flex h-3.5 w-3.5 items-center justify-center", children: /* @__PURE__ */ P(xu, { children: /* @__PURE__ */ P(vr, { className: "h-2 w-2 fill-current" }) }) }),
      t
    ]
  }
));
iy.displayName = $u.displayName;
const ly = w.forwardRef(({ className: e, inset: t, ...n }, o) => /* @__PURE__ */ P(
  vu,
  {
    ref: o,
    className: M("px-2 py-1.5 text-sm font-semibold", t && "pl-8", e),
    ...n
  }
));
ly.displayName = vu.displayName;
const dy = w.forwardRef(({ className: e, ...t }, n) => /* @__PURE__ */ P(
  wu,
  {
    ref: n,
    className: M("-mx-1 my-1 h-px bg-muted", e),
    ...t
  }
));
dy.displayName = wu.displayName;
function uy({
  className: e,
  ...t
}) {
  return /* @__PURE__ */ P(
    "span",
    {
      className: M("ml-auto text-xs tracking-widest opacity-60", e),
      ...t
    }
  );
}
uy.displayName = "DropdownMenuShortcut";
let ma;
const Su = "HoverCard", [Eu, dE] = we(Su, [
  lt
]), Qc = lt(), [fy, Jc] = Eu(Su), py = (e) => {
  const { __scopeHoverCard: t, children: n, open: o, defaultOpen: r, onOpenChange: a, openDelay: c = 700, closeDelay: s = 300 } = e, i = Qc(t), l = A(0), u = A(0), d = A(!1), f = A(!1), [m = !1, b] = Se({
    prop: o,
    defaultProp: r,
    onChange: a
  }), p = re(() => {
    clearTimeout(u.current), l.current = window.setTimeout(
      () => b(!0),
      c
    );
  }, [
    c,
    b
  ]), g = re(() => {
    clearTimeout(l.current), !d.current && !f.current && (u.current = window.setTimeout(
      () => b(!1),
      s
    ));
  }, [
    s,
    b
  ]), h = re(
    () => b(!1),
    [
      b
    ]
  );
  return j(() => () => {
    clearTimeout(l.current), clearTimeout(u.current);
  }, []), /* @__PURE__ */ v(fy, {
    scope: t,
    open: m,
    onOpenChange: b,
    onOpen: p,
    onClose: g,
    onDismiss: h,
    hasSelectionRef: d,
    isPointerDownOnContentRef: f
  }, /* @__PURE__ */ v(An, i, n));
}, my = "HoverCardTrigger", by = /* @__PURE__ */ _((e, t) => {
  const { __scopeHoverCard: n, ...o } = e, r = Jc(my, n), a = Qc(n);
  return /* @__PURE__ */ v(yo, S({
    asChild: !0
  }, a), /* @__PURE__ */ v(Z.a, S({
    "data-state": r.open ? "open" : "closed"
  }, o, {
    ref: t,
    onPointerEnter: O(e.onPointerEnter, ar(r.onOpen)),
    onPointerLeave: O(e.onPointerLeave, ar(r.onClose)),
    onFocus: O(e.onFocus, r.onOpen),
    onBlur: O(e.onBlur, r.onClose),
    onTouchStart: O(
      e.onTouchStart,
      (c) => c.preventDefault()
    )
  })));
}), vy = "HoverCardPortal", [uE, gy] = Eu(vy, {
  forceMount: void 0
}), za = "HoverCardContent", hy = /* @__PURE__ */ _((e, t) => {
  const n = gy(za, e.__scopeHoverCard), { forceMount: o = n.forceMount, ...r } = e, a = Jc(za, e.__scopeHoverCard);
  return /* @__PURE__ */ v(Ee, {
    present: o || a.open
  }, /* @__PURE__ */ v($y, S({
    "data-state": a.open ? "open" : "closed"
  }, r, {
    onPointerEnter: O(e.onPointerEnter, ar(a.onOpen)),
    onPointerLeave: O(e.onPointerLeave, ar(a.onClose)),
    ref: t
  })));
}), $y = /* @__PURE__ */ _((e, t) => {
  const { __scopeHoverCard: n, onEscapeKeyDown: o, onPointerDownOutside: r, onFocusOutside: a, onInteractOutside: c, ...s } = e, i = Jc(za, n), l = Qc(n), u = A(null), d = ae(t, u), [f, m] = q(!1);
  return j(() => {
    if (f) {
      const b = document.body;
      return ma = b.style.userSelect || b.style.webkitUserSelect, b.style.userSelect = "none", b.style.webkitUserSelect = "none", () => {
        b.style.userSelect = ma, b.style.webkitUserSelect = ma;
      };
    }
  }, [
    f
  ]), j(() => {
    if (u.current) {
      const b = () => {
        m(!1), i.isPointerDownOnContentRef.current = !1, setTimeout(() => {
          var p;
          ((p = document.getSelection()) === null || p === void 0 ? void 0 : p.toString()) !== "" && (i.hasSelectionRef.current = !0);
        });
      };
      return document.addEventListener("pointerup", b), () => {
        document.removeEventListener("pointerup", b), i.hasSelectionRef.current = !1, i.isPointerDownOnContentRef.current = !1;
      };
    }
  }, [
    i.isPointerDownOnContentRef,
    i.hasSelectionRef
  ]), j(() => {
    u.current && xy(u.current).forEach(
      (p) => p.setAttribute("tabindex", "-1")
    );
  }), /* @__PURE__ */ v(Ot, {
    asChild: !0,
    disableOutsidePointerEvents: !1,
    onInteractOutside: c,
    onEscapeKeyDown: o,
    onPointerDownOutside: r,
    onFocusOutside: O(a, (b) => {
      b.preventDefault();
    }),
    onDismiss: i.onDismiss
  }, /* @__PURE__ */ v(Co, S({}, l, s, {
    onPointerDown: O(s.onPointerDown, (b) => {
      b.currentTarget.contains(b.target) && m(!0), i.hasSelectionRef.current = !1, i.isPointerDownOnContentRef.current = !0;
    }),
    ref: d,
    style: {
      ...s.style,
      userSelect: f ? "text" : void 0,
      // Safari requires prefix
      WebkitUserSelect: f ? "text" : void 0,
      "--radix-hover-card-content-transform-origin": "var(--radix-popper-transform-origin)",
      "--radix-hover-card-content-available-width": "var(--radix-popper-available-width)",
      "--radix-hover-card-content-available-height": "var(--radix-popper-available-height)",
      "--radix-hover-card-trigger-width": "var(--radix-popper-anchor-width)",
      "--radix-hover-card-trigger-height": "var(--radix-popper-anchor-height)"
    }
  })));
});
function ar(e) {
  return (t) => t.pointerType === "touch" ? void 0 : e();
}
function xy(e) {
  const t = [], n = document.createTreeWalker(e, NodeFilter.SHOW_ELEMENT, {
    acceptNode: (o) => o.tabIndex >= 0 ? NodeFilter.FILTER_ACCEPT : NodeFilter.FILTER_SKIP
  });
  for (; n.nextNode(); )
    t.push(n.currentNode);
  return t;
}
const wy = py, yy = by, Pu = hy, fE = wy, pE = yy, Cy = w.forwardRef(({ className: e, align: t = "center", sideOffset: n = 4, ...o }, r) => /* @__PURE__ */ P(
  Pu,
  {
    ref: r,
    align: t,
    sideOffset: n,
    className: M(
      "z-50 w-64 rounded-md border bg-popover p-4 text-popover-foreground shadow-md outline-none data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",
      e
    ),
    ...o
  }
));
Cy.displayName = Pu.displayName;
const Sy = w.forwardRef(({ className: e, type: t, ...n }, o) => /* @__PURE__ */ P(
  "input",
  {
    type: t,
    className: M(
      "flex h-10 w-full rounded-md border border-input bg-background px-3 py-2 text-sm ring-offset-background file:border-0 file:bg-transparent file:text-sm file:font-medium placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50",
      e
    ),
    ref: o,
    ...n
  }
));
Sy.displayName = "Input";
const Ey = /* @__PURE__ */ _((e, t) => /* @__PURE__ */ v(Z.label, S({}, e, {
  ref: t,
  onMouseDown: (n) => {
    var o;
    (o = e.onMouseDown) === null || o === void 0 || o.call(e, n), !n.defaultPrevented && n.detail > 1 && n.preventDefault();
  }
}))), _u = Ey, Py = kt(
  "text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70"
), _y = w.forwardRef(({ className: e, ...t }, n) => /* @__PURE__ */ P(_u, { ref: n, className: M(Py(), e), ...t }));
_y.displayName = _u.displayName;
const es = "Menubar", [Va, Ty, Ny] = wt(es), [Tu, mE] = we(es, [
  Ny,
  dt
]), He = Po(), Nu = dt(), [Ry, ts] = Tu(es), Ay = /* @__PURE__ */ _((e, t) => {
  const { __scopeMenubar: n, value: o, onValueChange: r, defaultValue: a, loop: c = !0, dir: s, ...i } = e, l = rt(s), u = Nu(n), [d = "", f] = Se({
    prop: o,
    onChange: r,
    defaultProp: a
  }), [m, b] = q(null);
  return /* @__PURE__ */ v(Ry, {
    scope: n,
    value: d,
    onMenuOpen: re((p) => {
      f(p), b(p);
    }, [
      f
    ]),
    onMenuClose: re(
      () => f(""),
      [
        f
      ]
    ),
    onMenuToggle: re((p) => {
      f(
        (g) => g ? "" : p
      ), b(p);
    }, [
      f
    ]),
    dir: l,
    loop: c
  }, /* @__PURE__ */ v(Va.Provider, {
    scope: n
  }, /* @__PURE__ */ v(Va.Slot, {
    scope: n
  }, /* @__PURE__ */ v(So, S({
    asChild: !0
  }, u, {
    orientation: "horizontal",
    loop: c,
    dir: l,
    currentTabStopId: m,
    onCurrentTabStopIdChange: b
  }), /* @__PURE__ */ v(Z.div, S({
    role: "menubar"
  }, i, {
    ref: t
  }))))));
}), Ru = "MenubarMenu", [My, Au] = Tu(Ru), Dy = (e) => {
  const { __scopeMenubar: t, value: n, ...o } = e, r = Me(), a = n || r || "LEGACY_REACT_AUTO_VALUE", c = ts(Ru, t), s = He(t), i = A(null), l = A(!1), u = c.value === a;
  return j(() => {
    u || (l.current = !1);
  }, [
    u
  ]), /* @__PURE__ */ v(My, {
    scope: t,
    value: a,
    triggerId: Me(),
    triggerRef: i,
    contentId: Me(),
    wasKeyboardTriggerOpenRef: l
  }, /* @__PURE__ */ v(Oc, S({}, s, {
    open: u,
    onOpenChange: (d) => {
      d || c.onMenuClose();
    },
    modal: !1,
    dir: c.dir
  }, o)));
}, fi = "MenubarTrigger", Iy = /* @__PURE__ */ _((e, t) => {
  const { __scopeMenubar: n, disabled: o = !1, ...r } = e, a = Nu(n), c = He(n), s = ts(fi, n), i = Au(fi, n), l = A(null), u = ae(t, l, i.triggerRef), [d, f] = q(!1), m = s.value === i.value;
  return /* @__PURE__ */ v(Va.ItemSlot, {
    scope: n,
    value: i.value,
    disabled: o
  }, /* @__PURE__ */ v(Eo, S({
    asChild: !0
  }, a, {
    focusable: !o,
    tabStopId: i.value
  }), /* @__PURE__ */ v(kc, S({
    asChild: !0
  }, c), /* @__PURE__ */ v(Z.button, S({
    type: "button",
    role: "menuitem",
    id: i.triggerId,
    "aria-haspopup": "menu",
    "aria-expanded": m,
    "aria-controls": m ? i.contentId : void 0,
    "data-highlighted": d ? "" : void 0,
    "data-state": m ? "open" : "closed",
    "data-disabled": o ? "" : void 0,
    disabled: o
  }, r, {
    ref: u,
    onPointerDown: O(e.onPointerDown, (b) => {
      !o && b.button === 0 && b.ctrlKey === !1 && (s.onMenuOpen(i.value), m || b.preventDefault());
    }),
    onPointerEnter: O(e.onPointerEnter, () => {
      if (!!s.value && !m) {
        var p;
        s.onMenuOpen(i.value), (p = l.current) === null || p === void 0 || p.focus();
      }
    }),
    onKeyDown: O(e.onKeyDown, (b) => {
      o || ([
        "Enter",
        " "
      ].includes(b.key) && s.onMenuToggle(i.value), b.key === "ArrowDown" && s.onMenuOpen(i.value), [
        "Enter",
        " ",
        "ArrowDown"
      ].includes(b.key) && (i.wasKeyboardTriggerOpenRef.current = !0, b.preventDefault()));
    }),
    onFocus: O(
      e.onFocus,
      () => f(!0)
    ),
    onBlur: O(
      e.onBlur,
      () => f(!1)
    )
  })))));
}), Oy = (e) => {
  const { __scopeMenubar: t, ...n } = e, o = He(t);
  return /* @__PURE__ */ v(Lc, S({}, o, n));
}, pi = "MenubarContent", ky = /* @__PURE__ */ _((e, t) => {
  const { __scopeMenubar: n, align: o = "start", ...r } = e, a = He(n), c = ts(pi, n), s = Au(pi, n), i = Ty(n), l = A(!1);
  return /* @__PURE__ */ v(Fc, S({
    id: s.contentId,
    "aria-labelledby": s.triggerId,
    "data-radix-menubar-content": ""
  }, a, r, {
    ref: t,
    align: o,
    onCloseAutoFocus: O(e.onCloseAutoFocus, (u) => {
      if (!!!c.value && !l.current) {
        var f;
        (f = s.triggerRef.current) === null || f === void 0 || f.focus();
      }
      l.current = !1, u.preventDefault();
    }),
    onFocusOutside: O(e.onFocusOutside, (u) => {
      const d = u.target;
      i().some((m) => {
        var b;
        return (b = m.ref.current) === null || b === void 0 ? void 0 : b.contains(d);
      }) && u.preventDefault();
    }),
    onInteractOutside: O(e.onInteractOutside, () => {
      l.current = !0;
    }),
    onEntryFocus: (u) => {
      s.wasKeyboardTriggerOpenRef.current || u.preventDefault();
    },
    onKeyDown: O(e.onKeyDown, (u) => {
      if ([
        "ArrowRight",
        "ArrowLeft"
      ].includes(u.key)) {
        const d = u.target, f = d.hasAttribute("data-radix-menubar-subtrigger"), m = d.closest("[data-radix-menubar-content]") !== u.currentTarget, p = (c.dir === "rtl" ? "ArrowRight" : "ArrowLeft") === u.key;
        if (!p && f || m && p)
          return;
        let $ = i().filter(
          (y) => !y.disabled
        ).map(
          (y) => y.value
        );
        p && $.reverse();
        const x = $.indexOf(s.value);
        $ = c.loop ? Yy($, x + 1) : $.slice(x + 1);
        const [C] = $;
        C && c.onMenuOpen(C);
      }
    }, {
      checkForDefaultPrevented: !1
    }),
    style: {
      ...e.style,
      "--radix-menubar-content-transform-origin": "var(--radix-popper-transform-origin)",
      "--radix-menubar-content-available-width": "var(--radix-popper-available-width)",
      "--radix-menubar-content-available-height": "var(--radix-popper-available-height)",
      "--radix-menubar-trigger-width": "var(--radix-popper-anchor-width)",
      "--radix-menubar-trigger-height": "var(--radix-popper-anchor-height)"
    }
  }));
}), Ly = /* @__PURE__ */ _((e, t) => {
  const { __scopeMenubar: n, ...o } = e, r = He(n);
  return /* @__PURE__ */ v(zc, S({}, r, o, {
    ref: t
  }));
}), Fy = /* @__PURE__ */ _((e, t) => {
  const { __scopeMenubar: n, ...o } = e, r = He(n);
  return /* @__PURE__ */ v(Vc, S({}, r, o, {
    ref: t
  }));
}), zy = /* @__PURE__ */ _((e, t) => {
  const { __scopeMenubar: n, ...o } = e, r = He(n);
  return /* @__PURE__ */ v(Hc, S({}, r, o, {
    ref: t
  }));
}), Vy = /* @__PURE__ */ _((e, t) => {
  const { __scopeMenubar: n, ...o } = e, r = He(n);
  return /* @__PURE__ */ v(Bc, S({}, r, o, {
    ref: t
  }));
}), Hy = /* @__PURE__ */ _((e, t) => {
  const { __scopeMenubar: n, ...o } = e, r = He(n);
  return /* @__PURE__ */ v(Kc, S({}, r, o, {
    ref: t
  }));
}), By = /* @__PURE__ */ _((e, t) => {
  const { __scopeMenubar: n, ...o } = e, r = He(n);
  return /* @__PURE__ */ v(Gc, S({}, r, o, {
    ref: t
  }));
}), Ky = /* @__PURE__ */ _((e, t) => {
  const { __scopeMenubar: n, ...o } = e, r = He(n);
  return /* @__PURE__ */ v(Uc, S({}, r, o, {
    ref: t
  }));
}), Gy = /* @__PURE__ */ _((e, t) => {
  const { __scopeMenubar: n, ...o } = e, r = He(n);
  return /* @__PURE__ */ v(Wc, S({}, r, o, {
    ref: t
  }));
}), Uy = (e) => {
  const { __scopeMenubar: t, children: n, open: o, onOpenChange: r, defaultOpen: a } = e, c = He(t), [s = !1, i] = Se({
    prop: o,
    defaultProp: a,
    onChange: r
  });
  return /* @__PURE__ */ v(jc, S({}, c, {
    open: s,
    onOpenChange: i
  }), n);
}, Wy = /* @__PURE__ */ _((e, t) => {
  const { __scopeMenubar: n, ...o } = e, r = He(n);
  return /* @__PURE__ */ v(Yc, S({
    "data-radix-menubar-subtrigger": ""
  }, r, o, {
    ref: t
  }));
}), jy = /* @__PURE__ */ _((e, t) => {
  const { __scopeMenubar: n, ...o } = e, r = He(n);
  return /* @__PURE__ */ v(Xc, S({}, r, {
    "data-radix-menubar-content": ""
  }, o, {
    ref: t,
    style: {
      ...e.style,
      "--radix-menubar-content-transform-origin": "var(--radix-popper-transform-origin)",
      "--radix-menubar-content-available-width": "var(--radix-popper-available-width)",
      "--radix-menubar-content-available-height": "var(--radix-popper-available-height)",
      "--radix-menubar-trigger-width": "var(--radix-popper-anchor-width)",
      "--radix-menubar-trigger-height": "var(--radix-popper-anchor-height)"
    }
  }));
});
function Yy(e, t) {
  return e.map(
    (n, o) => e[(t + o) % e.length]
  );
}
const Mu = Ay, Xy = Dy, Du = Iy, Iu = Oy, Ou = ky, qy = Ly, ku = Fy, Lu = zy, Fu = Vy, Zy = Hy, zu = By, Vu = Ky, Hu = Gy, Qy = Uy, Bu = Wy, Ku = jy, bE = Xy, vE = qy, gE = Iu, hE = Qy, $E = Zy, Jy = w.forwardRef(({ className: e, ...t }, n) => /* @__PURE__ */ P(
  Mu,
  {
    ref: n,
    className: M(
      "flex h-10 items-center space-x-1 rounded-md border bg-background p-1",
      e
    ),
    ...t
  }
));
Jy.displayName = Mu.displayName;
const eC = w.forwardRef(({ className: e, ...t }, n) => /* @__PURE__ */ P(
  Du,
  {
    ref: n,
    className: M(
      "flex cursor-default select-none items-center rounded-sm px-3 py-1.5 text-sm font-medium outline-none focus:bg-accent focus:text-accent-foreground data-[state=open]:bg-accent data-[state=open]:text-accent-foreground",
      e
    ),
    ...t
  }
));
eC.displayName = Du.displayName;
const tC = w.forwardRef(({ className: e, inset: t, children: n, ...o }, r) => /* @__PURE__ */ ve(
  Bu,
  {
    ref: r,
    className: M(
      "flex cursor-default select-none items-center rounded-sm px-2 py-1.5 text-sm outline-none focus:bg-accent focus:text-accent-foreground data-[state=open]:bg-accent data-[state=open]:text-accent-foreground",
      t && "pl-8",
      e
    ),
    ...o,
    children: [
      n,
      /* @__PURE__ */ P(br, { className: "ml-auto h-4 w-4" })
    ]
  }
));
tC.displayName = Bu.displayName;
const nC = w.forwardRef(({ className: e, ...t }, n) => /* @__PURE__ */ P(
  Ku,
  {
    ref: n,
    className: M(
      "z-50 min-w-[8rem] overflow-hidden rounded-md border bg-popover p-1 text-popover-foreground data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",
      e
    ),
    ...t
  }
));
nC.displayName = Ku.displayName;
const oC = w.forwardRef(({ className: e, align: t = "start", alignOffset: n = -4, sideOffset: o = 8, ...r }, a) => /* @__PURE__ */ P(Iu, { children: /* @__PURE__ */ P(
  Ou,
  {
    ref: a,
    align: t,
    alignOffset: n,
    sideOffset: o,
    className: M(
      "z-50 min-w-[12rem] overflow-hidden rounded-md border bg-popover p-1 text-popover-foreground shadow-md data-[state=open]:animate-in data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",
      e
    ),
    ...r
  }
) }));
oC.displayName = Ou.displayName;
const rC = w.forwardRef(({ className: e, inset: t, ...n }, o) => /* @__PURE__ */ P(
  Lu,
  {
    ref: o,
    className: M(
      "relative flex cursor-default select-none items-center rounded-sm px-2 py-1.5 text-sm outline-none focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",
      t && "pl-8",
      e
    ),
    ...n
  }
));
rC.displayName = Lu.displayName;
const aC = w.forwardRef(({ className: e, children: t, checked: n, ...o }, r) => /* @__PURE__ */ ve(
  Fu,
  {
    ref: r,
    className: M(
      "relative flex cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",
      e
    ),
    checked: n,
    ...o,
    children: [
      /* @__PURE__ */ P("span", { className: "absolute left-2 flex h-3.5 w-3.5 items-center justify-center", children: /* @__PURE__ */ P(Vu, { children: /* @__PURE__ */ P(po, { className: "h-4 w-4" }) }) }),
      t
    ]
  }
));
aC.displayName = Fu.displayName;
const cC = w.forwardRef(({ className: e, children: t, ...n }, o) => /* @__PURE__ */ ve(
  zu,
  {
    ref: o,
    className: M(
      "relative flex cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",
      e
    ),
    ...n,
    children: [
      /* @__PURE__ */ P("span", { className: "absolute left-2 flex h-3.5 w-3.5 items-center justify-center", children: /* @__PURE__ */ P(Vu, { children: /* @__PURE__ */ P(vr, { className: "h-2 w-2 fill-current" }) }) }),
      t
    ]
  }
));
cC.displayName = zu.displayName;
const sC = w.forwardRef(({ className: e, inset: t, ...n }, o) => /* @__PURE__ */ P(
  ku,
  {
    ref: o,
    className: M("px-2 py-1.5 text-sm font-semibold", t && "pl-8", e),
    ...n
  }
));
sC.displayName = ku.displayName;
const iC = w.forwardRef(({ className: e, ...t }, n) => /* @__PURE__ */ P(
  Hu,
  {
    ref: n,
    className: M("-mx-1 my-1 h-px bg-muted", e),
    ...t
  }
));
iC.displayName = Hu.displayName;
function lC({
  className: e,
  ...t
}) {
  return /* @__PURE__ */ P(
    "span",
    {
      className: M("ml-auto text-xs tracking-widest text-muted-foreground", e),
      ...t
    }
  );
}
lC.displayname = "MenubarShortcut";
const Dr = /* @__PURE__ */ _((e, t) => /* @__PURE__ */ v(Z.span, S({}, e, {
  ref: t,
  style: {
    // See: https://github.com/twbs/bootstrap/blob/master/scss/mixins/_screen-reader.scss
    position: "absolute",
    border: 0,
    width: 1,
    height: 1,
    padding: 0,
    margin: -1,
    overflow: "hidden",
    clip: "rect(0, 0, 0, 0)",
    whiteSpace: "nowrap",
    wordWrap: "normal",
    ...e.style
  }
}))), Gu = Dr, To = "NavigationMenu", [ns, Uu, dC] = wt(To), [Ha, uC, fC] = wt(To), [os, xE] = we(To, [
  dC,
  fC
]), [pC, st] = os(To), [mC, bC] = os(To), vC = /* @__PURE__ */ _((e, t) => {
  const { __scopeNavigationMenu: n, value: o, onValueChange: r, defaultValue: a, delayDuration: c = 200, skipDelayDuration: s = 300, orientation: i = "horizontal", dir: l, ...u } = e, [d, f] = q(null), m = ae(
    t,
    (N) => f(N)
  ), b = rt(l), p = A(0), g = A(0), h = A(0), [$, x] = q(!0), [C = "", y] = Se({
    prop: o,
    onChange: (N) => {
      const H = N !== "", K = s > 0;
      H ? (window.clearTimeout(h.current), K && x(!1)) : (window.clearTimeout(h.current), h.current = window.setTimeout(
        () => x(!0),
        s
      )), r == null || r(N);
    },
    defaultProp: a
  }), E = re(() => {
    window.clearTimeout(g.current), g.current = window.setTimeout(
      () => y(""),
      150
    );
  }, [
    y
  ]), T = re((N) => {
    window.clearTimeout(g.current), y(N);
  }, [
    y
  ]), R = re((N) => {
    C === N ? window.clearTimeout(g.current) : p.current = window.setTimeout(() => {
      window.clearTimeout(g.current), y(N);
    }, c);
  }, [
    C,
    y,
    c
  ]);
  return j(() => () => {
    window.clearTimeout(p.current), window.clearTimeout(g.current), window.clearTimeout(h.current);
  }, []), /* @__PURE__ */ v(gC, {
    scope: n,
    isRootMenu: !0,
    value: C,
    dir: b,
    orientation: i,
    rootNavigationMenu: d,
    onTriggerEnter: (N) => {
      window.clearTimeout(p.current), $ ? R(N) : T(N);
    },
    onTriggerLeave: () => {
      window.clearTimeout(p.current), E();
    },
    onContentEnter: () => window.clearTimeout(g.current),
    onContentLeave: E,
    onItemSelect: (N) => {
      y(
        (H) => H === N ? "" : N
      );
    },
    onItemDismiss: () => y("")
  }, /* @__PURE__ */ v(Z.nav, S({
    "aria-label": "Main",
    "data-orientation": i,
    dir: b
  }, u, {
    ref: m
  })));
}), gC = (e) => {
  const { scope: t, isRootMenu: n, rootNavigationMenu: o, dir: r, orientation: a, children: c, value: s, onItemSelect: i, onItemDismiss: l, onTriggerEnter: u, onTriggerLeave: d, onContentEnter: f, onContentLeave: m } = e, [b, p] = q(null), [g, h] = q(/* @__PURE__ */ new Map()), [$, x] = q(null);
  return /* @__PURE__ */ v(pC, {
    scope: t,
    isRootMenu: n,
    rootNavigationMenu: o,
    value: s,
    previousValue: _n(s),
    baseId: Me(),
    dir: r,
    orientation: a,
    viewport: b,
    onViewportChange: p,
    indicatorTrack: $,
    onIndicatorTrackChange: x,
    onTriggerEnter: ge(u),
    onTriggerLeave: ge(d),
    onContentEnter: ge(f),
    onContentLeave: ge(m),
    onItemSelect: ge(i),
    onItemDismiss: ge(l),
    onViewportContentChange: re((C, y) => {
      h((E) => (E.set(C, y), new Map(E)));
    }, []),
    onViewportContentRemove: re((C) => {
      h((y) => y.has(C) ? (y.delete(C), new Map(y)) : y);
    }, [])
  }, /* @__PURE__ */ v(ns.Provider, {
    scope: t
  }, /* @__PURE__ */ v(mC, {
    scope: t,
    items: g
  }, c)));
}, hC = "NavigationMenuList", $C = /* @__PURE__ */ _((e, t) => {
  const { __scopeNavigationMenu: n, ...o } = e, r = st(hC, n), a = /* @__PURE__ */ v(Z.ul, S({
    "data-orientation": r.orientation
  }, o, {
    ref: t
  }));
  return /* @__PURE__ */ v(Z.div, {
    style: {
      position: "relative"
    },
    ref: r.onIndicatorTrackChange
  }, /* @__PURE__ */ v(ns.Slot, {
    scope: n
  }, r.isRootMenu ? /* @__PURE__ */ v(qu, {
    asChild: !0
  }, a) : a));
}), xC = "NavigationMenuItem", [wC, Wu] = os(xC), yC = /* @__PURE__ */ _((e, t) => {
  const { __scopeNavigationMenu: n, value: o, ...r } = e, a = Me(), c = o || a || "LEGACY_REACT_AUTO_VALUE", s = A(null), i = A(null), l = A(null), u = A(() => {
  }), d = A(!1), f = re((b = "start") => {
    if (s.current) {
      u.current();
      const p = Ba(s.current);
      p.length && rs(b === "start" ? p : p.reverse());
    }
  }, []), m = re(() => {
    if (s.current) {
      const b = Ba(s.current);
      b.length && (u.current = DC(b));
    }
  }, []);
  return /* @__PURE__ */ v(wC, {
    scope: n,
    value: c,
    triggerRef: i,
    contentRef: s,
    focusProxyRef: l,
    wasEscapeCloseRef: d,
    onEntryKeyDown: f,
    onFocusProxyEnter: f,
    onRootContentClose: m,
    onContentFocusOutside: m
  }, /* @__PURE__ */ v(Z.li, S({}, r, {
    ref: t
  })));
}), mi = "NavigationMenuTrigger", CC = /* @__PURE__ */ _((e, t) => {
  const { __scopeNavigationMenu: n, disabled: o, ...r } = e, a = st(mi, e.__scopeNavigationMenu), c = Wu(mi, e.__scopeNavigationMenu), s = A(null), i = ae(s, c.triggerRef, t), l = Qu(a.baseId, c.value), u = Ju(a.baseId, c.value), d = A(!1), f = A(!1), m = c.value === a.value;
  return /* @__PURE__ */ v(Ge, null, /* @__PURE__ */ v(ns.ItemSlot, {
    scope: n,
    value: c.value
  }, /* @__PURE__ */ v(Zu, {
    asChild: !0
  }, /* @__PURE__ */ v(Z.button, S({
    id: l,
    disabled: o,
    "data-disabled": o ? "" : void 0,
    "data-state": as(m),
    "aria-expanded": m,
    "aria-controls": u
  }, r, {
    ref: i,
    onPointerEnter: O(e.onPointerEnter, () => {
      f.current = !1, c.wasEscapeCloseRef.current = !1;
    }),
    onPointerMove: O(e.onPointerMove, cr(() => {
      o || f.current || c.wasEscapeCloseRef.current || d.current || (a.onTriggerEnter(c.value), d.current = !0);
    })),
    onPointerLeave: O(e.onPointerLeave, cr(() => {
      o || (a.onTriggerLeave(), d.current = !1);
    })),
    onClick: O(e.onClick, () => {
      a.onItemSelect(c.value), f.current = m;
    }),
    onKeyDown: O(e.onKeyDown, (b) => {
      const g = {
        horizontal: "ArrowDown",
        vertical: a.dir === "rtl" ? "ArrowLeft" : "ArrowRight"
      }[a.orientation];
      m && b.key === g && (c.onEntryKeyDown(), b.preventDefault());
    })
  })))), m && /* @__PURE__ */ v(Ge, null, /* @__PURE__ */ v(Gu, {
    "aria-hidden": !0,
    tabIndex: 0,
    ref: c.focusProxyRef,
    onFocus: (b) => {
      const p = c.contentRef.current, g = b.relatedTarget, h = g === s.current, $ = p == null ? void 0 : p.contains(g);
      (h || !$) && c.onFocusProxyEnter(h ? "start" : "end");
    }
  }), a.viewport && /* @__PURE__ */ v("span", {
    "aria-owns": u
  })));
}), bi = "navigationMenu.linkSelect", SC = /* @__PURE__ */ _((e, t) => {
  const { __scopeNavigationMenu: n, active: o, onSelect: r, ...a } = e;
  return /* @__PURE__ */ v(Zu, {
    asChild: !0
  }, /* @__PURE__ */ v(Z.a, S({
    "data-active": o ? "" : void 0,
    "aria-current": o ? "page" : void 0
  }, a, {
    ref: t,
    onClick: O(e.onClick, (c) => {
      const s = c.target, i = new CustomEvent(bi, {
        bubbles: !0,
        cancelable: !0
      });
      if (s.addEventListener(
        bi,
        (l) => r == null ? void 0 : r(l),
        {
          once: !0
        }
      ), Xn(s, i), !i.defaultPrevented && !c.metaKey) {
        const l = new CustomEvent(Xo, {
          bubbles: !0,
          cancelable: !0
        });
        Xn(s, l);
      }
    }, {
      checkForDefaultPrevented: !1
    })
  })));
}), ju = "NavigationMenuIndicator", EC = /* @__PURE__ */ _((e, t) => {
  const { forceMount: n, ...o } = e, r = st(ju, e.__scopeNavigationMenu), a = !!r.value;
  return r.indicatorTrack ? /* @__PURE__ */ tc.createPortal(/* @__PURE__ */ v(Ee, {
    present: n || a
  }, /* @__PURE__ */ v(PC, S({}, o, {
    ref: t
  }))), r.indicatorTrack) : null;
}), PC = /* @__PURE__ */ _((e, t) => {
  const { __scopeNavigationMenu: n, ...o } = e, r = st(ju, n), a = Uu(n), [c, s] = q(null), [i, l] = q(null), u = r.orientation === "horizontal", d = !!r.value;
  j(() => {
    var m;
    const p = (m = a().find(
      (g) => g.value === r.value
    )) === null || m === void 0 ? void 0 : m.ref.current;
    p && s(p);
  }, [
    a,
    r.value
  ]);
  const f = () => {
    c && l({
      size: u ? c.offsetWidth : c.offsetHeight,
      offset: u ? c.offsetLeft : c.offsetTop
    });
  };
  return Ka(c, f), Ka(r.indicatorTrack, f), i ? /* @__PURE__ */ v(Z.div, S({
    "aria-hidden": !0,
    "data-state": d ? "visible" : "hidden",
    "data-orientation": r.orientation
  }, o, {
    ref: t,
    style: {
      position: "absolute",
      ...u ? {
        left: 0,
        width: i.size + "px",
        transform: `translateX(${i.offset}px)`
      } : {
        top: 0,
        height: i.size + "px",
        transform: `translateY(${i.offset}px)`
      },
      ...o.style
    }
  })) : null;
}), ro = "NavigationMenuContent", _C = /* @__PURE__ */ _((e, t) => {
  const { forceMount: n, ...o } = e, r = st(ro, e.__scopeNavigationMenu), a = Wu(ro, e.__scopeNavigationMenu), c = ae(a.contentRef, t), s = a.value === r.value, i = {
    value: a.value,
    triggerRef: a.triggerRef,
    focusProxyRef: a.focusProxyRef,
    wasEscapeCloseRef: a.wasEscapeCloseRef,
    onContentFocusOutside: a.onContentFocusOutside,
    onRootContentClose: a.onRootContentClose,
    ...o
  };
  return r.viewport ? /* @__PURE__ */ v(TC, S({
    forceMount: n
  }, i, {
    ref: c
  })) : /* @__PURE__ */ v(Ee, {
    present: n || s
  }, /* @__PURE__ */ v(Yu, S({
    "data-state": as(s)
  }, i, {
    ref: c,
    onPointerEnter: O(e.onPointerEnter, r.onContentEnter),
    onPointerLeave: O(e.onPointerLeave, cr(r.onContentLeave)),
    style: {
      // Prevent interaction when animating out
      pointerEvents: !s && r.isRootMenu ? "none" : void 0,
      ...i.style
    }
  })));
}), TC = /* @__PURE__ */ _((e, t) => {
  const n = st(ro, e.__scopeNavigationMenu), { onViewportContentChange: o, onViewportContentRemove: r } = n;
  return Re(() => {
    o(e.value, {
      ref: t,
      ...e
    });
  }, [
    e,
    t,
    o
  ]), Re(() => () => r(e.value), [
    e.value,
    r
  ]), null;
}), Xo = "navigationMenu.rootContentDismiss", Yu = /* @__PURE__ */ _((e, t) => {
  const { __scopeNavigationMenu: n, value: o, triggerRef: r, focusProxyRef: a, wasEscapeCloseRef: c, onRootContentClose: s, onContentFocusOutside: i, ...l } = e, u = st(ro, n), d = A(null), f = ae(d, t), m = Qu(u.baseId, o), b = Ju(u.baseId, o), p = Uu(n), g = A(null), { onItemDismiss: h } = u;
  j(() => {
    const x = d.current;
    if (u.isRootMenu && x) {
      const C = () => {
        var y;
        h(), s(), x.contains(document.activeElement) && ((y = r.current) === null || y === void 0 || y.focus());
      };
      return x.addEventListener(Xo, C), () => x.removeEventListener(Xo, C);
    }
  }, [
    u.isRootMenu,
    e.value,
    r,
    h,
    s
  ]);
  const $ = Fe(() => {
    const C = p().map(
      (H) => H.value
    );
    u.dir === "rtl" && C.reverse();
    const y = C.indexOf(u.value), E = C.indexOf(u.previousValue), T = o === u.value, R = E === C.indexOf(o);
    if (!T && !R)
      return g.current;
    const N = (() => {
      if (y !== E) {
        if (T && E !== -1)
          return y > E ? "from-end" : "from-start";
        if (R && y !== -1)
          return y > E ? "to-start" : "to-end";
      }
      return null;
    })();
    return g.current = N, N;
  }, [
    u.previousValue,
    u.value,
    u.dir,
    p,
    o
  ]);
  return /* @__PURE__ */ v(qu, {
    asChild: !0
  }, /* @__PURE__ */ v(Ot, S({
    id: b,
    "aria-labelledby": m,
    "data-motion": $,
    "data-orientation": u.orientation
  }, l, {
    ref: f,
    onDismiss: () => {
      var x;
      const C = new Event(Xo, {
        bubbles: !0,
        cancelable: !0
      });
      (x = d.current) === null || x === void 0 || x.dispatchEvent(C);
    },
    onFocusOutside: O(e.onFocusOutside, (x) => {
      var C;
      i();
      const y = x.target;
      (C = u.rootNavigationMenu) !== null && C !== void 0 && C.contains(y) && x.preventDefault();
    }),
    onPointerDownOutside: O(e.onPointerDownOutside, (x) => {
      var C;
      const y = x.target, E = p().some((R) => {
        var N;
        return (N = R.ref.current) === null || N === void 0 ? void 0 : N.contains(y);
      }), T = u.isRootMenu && ((C = u.viewport) === null || C === void 0 ? void 0 : C.contains(y));
      (E || T || !u.isRootMenu) && x.preventDefault();
    }),
    onKeyDown: O(e.onKeyDown, (x) => {
      const C = x.altKey || x.ctrlKey || x.metaKey;
      if (x.key === "Tab" && !C) {
        const T = Ba(x.currentTarget), R = document.activeElement, N = T.findIndex(
          (I) => I === R
        ), K = x.shiftKey ? T.slice(0, N).reverse() : T.slice(N + 1, T.length);
        if (rs(K))
          x.preventDefault();
        else {
          var E;
          (E = a.current) === null || E === void 0 || E.focus();
        }
      }
    }),
    onEscapeKeyDown: O(e.onEscapeKeyDown, (x) => {
      c.current = !0;
    })
  })));
}), Xu = "NavigationMenuViewport", NC = /* @__PURE__ */ _((e, t) => {
  const { forceMount: n, ...o } = e, a = !!st(Xu, e.__scopeNavigationMenu).value;
  return /* @__PURE__ */ v(Ee, {
    present: n || a
  }, /* @__PURE__ */ v(RC, S({}, o, {
    ref: t
  })));
}), RC = /* @__PURE__ */ _((e, t) => {
  const { __scopeNavigationMenu: n, children: o, ...r } = e, a = st(Xu, n), c = ae(t, a.onViewportChange), s = bC(ro, e.__scopeNavigationMenu), [i, l] = q(null), [u, d] = q(null), f = i ? (i == null ? void 0 : i.width) + "px" : void 0, m = i ? (i == null ? void 0 : i.height) + "px" : void 0, b = !!a.value, p = b ? a.value : a.previousValue;
  return Ka(u, () => {
    u && l({
      width: u.offsetWidth,
      height: u.offsetHeight
    });
  }), /* @__PURE__ */ v(Z.div, S({
    "data-state": as(b),
    "data-orientation": a.orientation
  }, r, {
    ref: c,
    style: {
      // Prevent interaction when animating out
      pointerEvents: !b && a.isRootMenu ? "none" : void 0,
      "--radix-navigation-menu-viewport-width": f,
      "--radix-navigation-menu-viewport-height": m,
      ...r.style
    },
    onPointerEnter: O(e.onPointerEnter, a.onContentEnter),
    onPointerLeave: O(e.onPointerLeave, cr(a.onContentLeave))
  }), Array.from(s.items).map(([h, { ref: $, forceMount: x, ...C }]) => {
    const y = p === h;
    return /* @__PURE__ */ v(Ee, {
      key: h,
      present: x || y
    }, /* @__PURE__ */ v(Yu, S({}, C, {
      ref: fo($, (E) => {
        y && E && d(E);
      })
    })));
  }));
}), AC = "FocusGroup", qu = /* @__PURE__ */ _((e, t) => {
  const { __scopeNavigationMenu: n, ...o } = e, r = st(AC, n);
  return /* @__PURE__ */ v(Ha.Provider, {
    scope: n
  }, /* @__PURE__ */ v(Ha.Slot, {
    scope: n
  }, /* @__PURE__ */ v(Z.div, S({
    dir: r.dir
  }, o, {
    ref: t
  }))));
}), vi = [
  "ArrowRight",
  "ArrowLeft",
  "ArrowUp",
  "ArrowDown"
], MC = "FocusGroupItem", Zu = /* @__PURE__ */ _((e, t) => {
  const { __scopeNavigationMenu: n, ...o } = e, r = uC(n), a = st(MC, n);
  return /* @__PURE__ */ v(Ha.ItemSlot, {
    scope: n
  }, /* @__PURE__ */ v(Z.button, S({}, o, {
    ref: t,
    onKeyDown: O(e.onKeyDown, (c) => {
      if ([
        "Home",
        "End",
        ...vi
      ].includes(c.key)) {
        let i = r().map(
          (d) => d.ref.current
        );
        if ([
          a.dir === "rtl" ? "ArrowRight" : "ArrowLeft",
          "ArrowUp",
          "End"
        ].includes(c.key) && i.reverse(), vi.includes(c.key)) {
          const d = i.indexOf(c.currentTarget);
          i = i.slice(d + 1);
        }
        setTimeout(
          () => rs(i)
        ), c.preventDefault();
      }
    })
  })));
});
function Ba(e) {
  const t = [], n = document.createTreeWalker(e, NodeFilter.SHOW_ELEMENT, {
    acceptNode: (o) => {
      const r = o.tagName === "INPUT" && o.type === "hidden";
      return o.disabled || o.hidden || r ? NodeFilter.FILTER_SKIP : o.tabIndex >= 0 ? NodeFilter.FILTER_ACCEPT : NodeFilter.FILTER_SKIP;
    }
  });
  for (; n.nextNode(); )
    t.push(n.currentNode);
  return t;
}
function rs(e) {
  const t = document.activeElement;
  return e.some((n) => n === t ? !0 : (n.focus(), document.activeElement !== t));
}
function DC(e) {
  return e.forEach((t) => {
    t.dataset.tabindex = t.getAttribute("tabindex") || "", t.setAttribute("tabindex", "-1");
  }), () => {
    e.forEach((t) => {
      const n = t.dataset.tabindex;
      t.setAttribute("tabindex", n);
    });
  };
}
function Ka(e, t) {
  const n = ge(t);
  Re(() => {
    let o = 0;
    if (e) {
      const r = new ResizeObserver(() => {
        cancelAnimationFrame(o), o = window.requestAnimationFrame(n);
      });
      return r.observe(e), () => {
        window.cancelAnimationFrame(o), r.unobserve(e);
      };
    }
  }, [
    e,
    n
  ]);
}
function as(e) {
  return e ? "open" : "closed";
}
function Qu(e, t) {
  return `${e}-trigger-${t}`;
}
function Ju(e, t) {
  return `${e}-content-${t}`;
}
function cr(e) {
  return (t) => t.pointerType === "mouse" ? e(t) : void 0;
}
const ef = vC, tf = $C, IC = yC, nf = CC, OC = SC, of = EC, rf = _C, af = NC, kC = w.forwardRef(({ className: e, ...t }, n) => /* @__PURE__ */ P(
  tf,
  {
    ref: n,
    className: M(
      "group flex flex-1 list-none items-center justify-center space-x-1",
      e
    ),
    ...t
  }
));
kC.displayName = tf.displayName;
const wE = IC, LC = kt(
  "group inline-flex h-10 w-max items-center justify-center rounded-md bg-background px-4 py-2 text-sm font-medium transition-colors hover:bg-accent hover:text-accent-foreground focus:bg-accent focus:text-accent-foreground focus:outline-none disabled:pointer-events-none disabled:opacity-50 data-[active]:bg-accent/50 data-[state=open]:bg-accent/50"
), FC = w.forwardRef(({ className: e, children: t, ...n }, o) => /* @__PURE__ */ ve(
  nf,
  {
    ref: o,
    className: M(LC(), "group", e),
    ...n,
    children: [
      t,
      " ",
      /* @__PURE__ */ P(
        mr,
        {
          className: "relative top-[1px] ml-1 h-3 w-3 transition duration-200 group-data-[state=open]:rotate-180",
          "aria-hidden": "true"
        }
      )
    ]
  }
));
FC.displayName = nf.displayName;
const zC = w.forwardRef(({ className: e, ...t }, n) => /* @__PURE__ */ P(
  rf,
  {
    ref: n,
    className: M(
      "left-0 top-0 w-full data-[motion^=from-]:animate-in data-[motion^=to-]:animate-out data-[motion^=from-]:fade-in data-[motion^=to-]:fade-out data-[motion=from-end]:slide-in-from-right-52 data-[motion=from-start]:slide-in-from-left-52 data-[motion=to-end]:slide-out-to-right-52 data-[motion=to-start]:slide-out-to-left-52 md:absolute md:w-auto ",
      e
    ),
    ...t
  }
));
zC.displayName = rf.displayName;
const yE = OC, cf = w.forwardRef(({ className: e, ...t }, n) => /* @__PURE__ */ P("div", { className: M("absolute left-0 top-full flex justify-center"), children: /* @__PURE__ */ P(
  af,
  {
    className: M(
      "origin-top-center relative mt-1.5 h-[var(--radix-navigation-menu-viewport-height)] w-full overflow-hidden rounded-md border bg-popover text-popover-foreground shadow-lg data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-90 md:w-[var(--radix-navigation-menu-viewport-width)]",
      e
    ),
    ref: n,
    ...t
  }
) }));
cf.displayName = af.displayName;
const VC = w.forwardRef(({ className: e, children: t, ...n }, o) => /* @__PURE__ */ ve(
  ef,
  {
    ref: o,
    className: M(
      "relative z-10 flex max-w-max flex-1 items-center justify-center",
      e
    ),
    ...n,
    children: [
      t,
      /* @__PURE__ */ P(cf, {})
    ]
  }
));
VC.displayName = ef.displayName;
const HC = w.forwardRef(({ className: e, ...t }, n) => /* @__PURE__ */ P(
  of,
  {
    ref: n,
    className: M(
      "top-full z-[1] flex h-1.5 items-end justify-center overflow-hidden data-[state=visible]:animate-in data-[state=hidden]:animate-out data-[state=hidden]:fade-out data-[state=visible]:fade-in",
      e
    ),
    ...t,
    children: /* @__PURE__ */ P(
      "div",
      {
        className: "relative top-[60%] h-2 w-2 rotate-45 rounded-tl-sm bg-border shadow-md"
      }
    )
  }
));
HC.displayName = of.displayName;
function CE({
  className: e,
  ...t
}) {
  return /* @__PURE__ */ P(
    "nav",
    {
      role: "navigation",
      "aria-label": "pagination",
      className: M("mx-auto flex w-full justify-center", e),
      ...t
    }
  );
}
const BC = w.forwardRef(({ className: e, ...t }, n) => /* @__PURE__ */ P(
  "ul",
  {
    ref: n,
    className: M("flex flex-row items-center gap-1", e),
    ...t
  }
));
BC.displayName = "PaginationContent";
const sf = w.forwardRef(({ className: e, ...t }, n) => /* @__PURE__ */ P("li", { ref: n, className: M("", e), ...t }));
sf.displayName = "PaginationItem";
function cs({
  className: e,
  isActive: t,
  size: n = "icon",
  ...o
}) {
  return /* @__PURE__ */ P(sf, { children: /* @__PURE__ */ P(
    "a",
    {
      "aria-current": t ? "page" : void 0,
      className: M(Sr({
        variant: t ? "outline" : "ghost",
        size: n
      }), e),
      ...o
    }
  ) });
}
cs.displayName = "PaginationLink";
function KC({
  className: e,
  ...t
}) {
  return /* @__PURE__ */ ve(
    cs,
    {
      "aria-label": "Go to previous page",
      size: "default",
      className: M("gap-1 pl-2.5", e),
      ...t,
      children: [
        /* @__PURE__ */ P(ub, { className: "h-4 w-4" }),
        /* @__PURE__ */ P("span", { children: "Previous" })
      ]
    }
  );
}
KC.displayName = "PaginationPrevious";
function SE({
  className: e,
  ...t
}) {
  return /* @__PURE__ */ ve(
    cs,
    {
      "aria-label": "Go to next page",
      size: "default",
      className: M("gap-1 pr-2.5", e),
      ...t,
      children: [
        /* @__PURE__ */ P("span", { children: "Next" }),
        /* @__PURE__ */ P(br, { className: "h-4 w-4" })
      ]
    }
  );
}
function EE({
  className: e,
  ...t
}) {
  return /* @__PURE__ */ ve(
    "span",
    {
      "aria-hidden": !0,
      className: M("flex h-9 w-9 items-center justify-center", e),
      ...t,
      children: [
        /* @__PURE__ */ P(mb, { className: "h-4 w-4" }),
        /* @__PURE__ */ P("span", { className: "sr-only", children: "More pages" })
      ]
    }
  );
}
const lf = "Popover", [df, PE] = we(lf, [
  lt
]), ss = lt(), [GC, Mn] = df(lf), UC = (e) => {
  const { __scopePopover: t, children: n, open: o, defaultOpen: r, onOpenChange: a, modal: c = !1 } = e, s = ss(t), i = A(null), [l, u] = q(!1), [d = !1, f] = Se({
    prop: o,
    defaultProp: r,
    onChange: a
  });
  return /* @__PURE__ */ v(An, s, /* @__PURE__ */ v(GC, {
    scope: t,
    contentId: Me(),
    triggerRef: i,
    open: d,
    onOpenChange: f,
    onOpenToggle: re(
      () => f(
        (m) => !m
      ),
      [
        f
      ]
    ),
    hasCustomAnchor: l,
    onCustomAnchorAdd: re(
      () => u(!0),
      []
    ),
    onCustomAnchorRemove: re(
      () => u(!1),
      []
    ),
    modal: c
  }, n));
}, WC = "PopoverTrigger", jC = /* @__PURE__ */ _((e, t) => {
  const { __scopePopover: n, ...o } = e, r = Mn(WC, n), a = ss(n), c = ae(t, r.triggerRef), s = /* @__PURE__ */ v(Z.button, S({
    type: "button",
    "aria-haspopup": "dialog",
    "aria-expanded": r.open,
    "aria-controls": r.contentId,
    "data-state": pf(r.open)
  }, o, {
    ref: c,
    onClick: O(e.onClick, r.onOpenToggle)
  }));
  return r.hasCustomAnchor ? s : /* @__PURE__ */ v(yo, S({
    asChild: !0
  }, a), s);
}), uf = "PopoverPortal", [YC, XC] = df(uf, {
  forceMount: void 0
}), qC = (e) => {
  const { __scopePopover: t, forceMount: n, children: o, container: r } = e, a = Mn(uf, t);
  return /* @__PURE__ */ v(YC, {
    scope: t,
    forceMount: n
  }, /* @__PURE__ */ v(Ee, {
    present: n || a.open
  }, /* @__PURE__ */ v(mo, {
    asChild: !0,
    container: r
  }, o)));
}, ao = "PopoverContent", ZC = /* @__PURE__ */ _((e, t) => {
  const n = XC(ao, e.__scopePopover), { forceMount: o = n.forceMount, ...r } = e, a = Mn(ao, e.__scopePopover);
  return /* @__PURE__ */ v(Ee, {
    present: o || a.open
  }, a.modal ? /* @__PURE__ */ v(QC, S({}, r, {
    ref: t
  })) : /* @__PURE__ */ v(JC, S({}, r, {
    ref: t
  })));
}), QC = /* @__PURE__ */ _((e, t) => {
  const n = Mn(ao, e.__scopePopover), o = A(null), r = ae(t, o), a = A(!1);
  return j(() => {
    const c = o.current;
    if (c)
      return bo(c);
  }, []), /* @__PURE__ */ v(xr, {
    as: gt,
    allowPinchZoom: !0
  }, /* @__PURE__ */ v(ff, S({}, e, {
    ref: r,
    trapFocus: n.open,
    disableOutsidePointerEvents: !0,
    onCloseAutoFocus: O(e.onCloseAutoFocus, (c) => {
      var s;
      c.preventDefault(), a.current || (s = n.triggerRef.current) === null || s === void 0 || s.focus();
    }),
    onPointerDownOutside: O(e.onPointerDownOutside, (c) => {
      const s = c.detail.originalEvent, i = s.button === 0 && s.ctrlKey === !0, l = s.button === 2 || i;
      a.current = l;
    }, {
      checkForDefaultPrevented: !1
    }),
    onFocusOutside: O(
      e.onFocusOutside,
      (c) => c.preventDefault(),
      {
        checkForDefaultPrevented: !1
      }
    )
  })));
}), JC = /* @__PURE__ */ _((e, t) => {
  const n = Mn(ao, e.__scopePopover), o = A(!1), r = A(!1);
  return /* @__PURE__ */ v(ff, S({}, e, {
    ref: t,
    trapFocus: !1,
    disableOutsidePointerEvents: !1,
    onCloseAutoFocus: (a) => {
      var c;
      if ((c = e.onCloseAutoFocus) === null || c === void 0 || c.call(e, a), !a.defaultPrevented) {
        var s;
        o.current || (s = n.triggerRef.current) === null || s === void 0 || s.focus(), a.preventDefault();
      }
      o.current = !1, r.current = !1;
    },
    onInteractOutside: (a) => {
      var c, s;
      (c = e.onInteractOutside) === null || c === void 0 || c.call(e, a), a.defaultPrevented || (o.current = !0, a.detail.originalEvent.type === "pointerdown" && (r.current = !0));
      const i = a.target;
      ((s = n.triggerRef.current) === null || s === void 0 ? void 0 : s.contains(i)) && a.preventDefault(), a.detail.originalEvent.type === "focusin" && r.current && a.preventDefault();
    }
  }));
}), ff = /* @__PURE__ */ _((e, t) => {
  const { __scopePopover: n, trapFocus: o, onOpenAutoFocus: r, onCloseAutoFocus: a, disableOutsidePointerEvents: c, onEscapeKeyDown: s, onPointerDownOutside: i, onFocusOutside: l, onInteractOutside: u, ...d } = e, f = Mn(ao, n), m = ss(n);
  return hr(), /* @__PURE__ */ v(gr, {
    asChild: !0,
    loop: !0,
    trapped: o,
    onMountAutoFocus: r,
    onUnmountAutoFocus: a
  }, /* @__PURE__ */ v(Ot, {
    asChild: !0,
    disableOutsidePointerEvents: c,
    onInteractOutside: u,
    onEscapeKeyDown: s,
    onPointerDownOutside: i,
    onFocusOutside: l,
    onDismiss: () => f.onOpenChange(!1)
  }, /* @__PURE__ */ v(Co, S({
    "data-state": pf(f.open),
    role: "dialog",
    id: f.contentId
  }, m, d, {
    ref: t,
    style: {
      ...d.style,
      "--radix-popover-content-transform-origin": "var(--radix-popper-transform-origin)",
      "--radix-popover-content-available-width": "var(--radix-popper-available-width)",
      "--radix-popover-content-available-height": "var(--radix-popper-available-height)",
      "--radix-popover-trigger-width": "var(--radix-popper-anchor-width)",
      "--radix-popover-trigger-height": "var(--radix-popper-anchor-height)"
    }
  }))));
});
function pf(e) {
  return e ? "open" : "closed";
}
const e2 = UC, t2 = jC, n2 = qC, mf = ZC, _E = e2, TE = t2, o2 = w.forwardRef(({ className: e, align: t = "center", sideOffset: n = 4, ...o }, r) => /* @__PURE__ */ P(n2, { children: /* @__PURE__ */ P(
  mf,
  {
    ref: r,
    align: t,
    sideOffset: n,
    className: M(
      "z-50 w-72 rounded-md border bg-popover p-4 text-popover-foreground shadow-md outline-none data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",
      e
    ),
    ...o
  }
) }));
o2.displayName = mf.displayName;
const bf = "Progress", Ir = 100, [r2, NE] = we(bf), [a2, c2] = r2(bf), vf = /* @__PURE__ */ _((e, t) => {
  const { __scopeProgress: n, value: o, max: r, getValueLabel: a = l2, ...c } = e, s = Ga(r) ? r : Ir, i = hf(o, s) ? o : null, l = sr(i) ? a(i, s) : void 0;
  return /* @__PURE__ */ v(a2, {
    scope: n,
    value: i,
    max: s
  }, /* @__PURE__ */ v(Z.div, S({
    "aria-valuemax": s,
    "aria-valuemin": 0,
    "aria-valuenow": sr(i) ? i : void 0,
    "aria-valuetext": l,
    role: "progressbar",
    "data-state": gf(i, s),
    "data-value": i ?? void 0,
    "data-max": s
  }, c, {
    ref: t
  })));
});
vf.propTypes = {
  max(e, t, n) {
    const o = e[t], r = String(o);
    return o && !Ga(o) ? new Error(d2(r, n)) : null;
  },
  value(e, t, n) {
    const o = e[t], r = String(o), a = Ga(e.max) ? e.max : Ir;
    return o != null && !hf(o, a) ? new Error(u2(r, n)) : null;
  }
};
const s2 = "ProgressIndicator", i2 = /* @__PURE__ */ _((e, t) => {
  var n;
  const { __scopeProgress: o, ...r } = e, a = c2(s2, o);
  return /* @__PURE__ */ v(Z.div, S({
    "data-state": gf(a.value, a.max),
    "data-value": (n = a.value) !== null && n !== void 0 ? n : void 0,
    "data-max": a.max
  }, r, {
    ref: t
  }));
});
function l2(e, t) {
  return `${Math.round(e / t * 100)}%`;
}
function gf(e, t) {
  return e == null ? "indeterminate" : e === t ? "complete" : "loading";
}
function sr(e) {
  return typeof e == "number";
}
function Ga(e) {
  return sr(e) && !isNaN(e) && e > 0;
}
function hf(e, t) {
  return sr(e) && !isNaN(e) && e <= t && e >= 0;
}
function d2(e, t) {
  return `Invalid prop \`max\` of value \`${e}\` supplied to \`${t}\`. Only numbers greater than 0 are valid max values. Defaulting to \`${Ir}\`.`;
}
function u2(e, t) {
  return `Invalid prop \`value\` of value \`${e}\` supplied to \`${t}\`. The \`value\` prop must be:
  - a positive number
  - less than the value passed to \`max\` (or ${Ir} if no \`max\` prop is set)
  - \`null\` if the progress is indeterminate.

Defaulting to \`null\`.`;
}
const $f = vf, f2 = i2, p2 = w.forwardRef(({ className: e, value: t, ...n }, o) => /* @__PURE__ */ P(
  $f,
  {
    ref: o,
    className: M("relative h-4 w-full overflow-hidden rounded-full bg-secondary", e),
    ...n,
    children: /* @__PURE__ */ P(
      f2,
      {
        className: "h-full w-full flex-1 bg-primary transition-all",
        style: { transform: `translateX(-${100 - (t || 0)}%)` }
      }
    )
  }
));
p2.displayName = $f.displayName;
const xf = "Radio", [m2, wf] = we(xf), [b2, v2] = m2(xf), g2 = /* @__PURE__ */ _((e, t) => {
  const { __scopeRadio: n, name: o, checked: r = !1, required: a, disabled: c, value: s = "on", onCheck: i, ...l } = e, [u, d] = q(null), f = ae(
    t,
    (p) => d(p)
  ), m = A(!1), b = u ? !!u.closest("form") : !0;
  return /* @__PURE__ */ v(b2, {
    scope: n,
    checked: r,
    disabled: c
  }, /* @__PURE__ */ v(Z.button, S({
    type: "button",
    role: "radio",
    "aria-checked": r,
    "data-state": yf(r),
    "data-disabled": c ? "" : void 0,
    disabled: c,
    value: s
  }, l, {
    ref: f,
    onClick: O(e.onClick, (p) => {
      r || i == null || i(), b && (m.current = p.isPropagationStopped(), m.current || p.stopPropagation());
    })
  })), b && /* @__PURE__ */ v(x2, {
    control: u,
    bubbles: !m.current,
    name: o,
    value: s,
    checked: r,
    required: a,
    disabled: c,
    style: {
      transform: "translateX(-100%)"
    }
  }));
}), h2 = "RadioIndicator", $2 = /* @__PURE__ */ _((e, t) => {
  const { __scopeRadio: n, forceMount: o, ...r } = e, a = v2(h2, n);
  return /* @__PURE__ */ v(Ee, {
    present: o || a.checked
  }, /* @__PURE__ */ v(Z.span, S({
    "data-state": yf(a.checked),
    "data-disabled": a.disabled ? "" : void 0
  }, r, {
    ref: t
  })));
}), x2 = (e) => {
  const { control: t, checked: n, bubbles: o = !0, ...r } = e, a = A(null), c = _n(n), s = go(t);
  return j(() => {
    const i = a.current, l = window.HTMLInputElement.prototype, d = Object.getOwnPropertyDescriptor(l, "checked").set;
    if (c !== n && d) {
      const f = new Event("click", {
        bubbles: o
      });
      d.call(i, n), i.dispatchEvent(f);
    }
  }, [
    c,
    n,
    o
  ]), /* @__PURE__ */ v("input", S({
    type: "radio",
    "aria-hidden": !0,
    defaultChecked: n
  }, r, {
    tabIndex: -1,
    ref: a,
    style: {
      ...e.style,
      ...s,
      position: "absolute",
      pointerEvents: "none",
      opacity: 0,
      margin: 0
    }
  }));
};
function yf(e) {
  return e ? "checked" : "unchecked";
}
const w2 = [
  "ArrowUp",
  "ArrowDown",
  "ArrowLeft",
  "ArrowRight"
], Cf = "RadioGroup", [y2, RE] = we(Cf, [
  dt,
  wf
]), Sf = dt(), Ef = wf(), [C2, S2] = y2(Cf), E2 = /* @__PURE__ */ _((e, t) => {
  const { __scopeRadioGroup: n, name: o, defaultValue: r, value: a, required: c = !1, disabled: s = !1, orientation: i, dir: l, loop: u = !0, onValueChange: d, ...f } = e, m = Sf(n), b = rt(l), [p, g] = Se({
    prop: a,
    defaultProp: r,
    onChange: d
  });
  return /* @__PURE__ */ v(C2, {
    scope: n,
    name: o,
    required: c,
    disabled: s,
    value: p,
    onValueChange: g
  }, /* @__PURE__ */ v(So, S({
    asChild: !0
  }, m, {
    orientation: i,
    dir: b,
    loop: u
  }), /* @__PURE__ */ v(Z.div, S({
    role: "radiogroup",
    "aria-required": c,
    "aria-orientation": i,
    "data-disabled": s ? "" : void 0,
    dir: b
  }, f, {
    ref: t
  }))));
}), P2 = "RadioGroupItem", _2 = /* @__PURE__ */ _((e, t) => {
  const { __scopeRadioGroup: n, disabled: o, ...r } = e, a = S2(P2, n), c = a.disabled || o, s = Sf(n), i = Ef(n), l = A(null), u = ae(t, l), d = a.value === r.value, f = A(!1);
  return j(() => {
    const m = (p) => {
      w2.includes(p.key) && (f.current = !0);
    }, b = () => f.current = !1;
    return document.addEventListener("keydown", m), document.addEventListener("keyup", b), () => {
      document.removeEventListener("keydown", m), document.removeEventListener("keyup", b);
    };
  }, []), /* @__PURE__ */ v(Eo, S({
    asChild: !0
  }, s, {
    focusable: !c,
    active: d
  }), /* @__PURE__ */ v(g2, S({
    disabled: c,
    required: a.required,
    checked: d
  }, i, r, {
    name: a.name,
    ref: u,
    onCheck: () => a.onValueChange(r.value),
    onKeyDown: O((m) => {
      m.key === "Enter" && m.preventDefault();
    }),
    onFocus: O(r.onFocus, () => {
      var m;
      f.current && ((m = l.current) === null || m === void 0 || m.click());
    })
  })));
}), T2 = /* @__PURE__ */ _((e, t) => {
  const { __scopeRadioGroup: n, ...o } = e, r = Ef(n);
  return /* @__PURE__ */ v($2, S({}, r, o, {
    ref: t
  }));
}), Pf = E2, _f = _2, N2 = T2, R2 = w.forwardRef(({ className: e, ...t }, n) => /* @__PURE__ */ P(Pf, { className: M("grid gap-2", e), ...t, ref: n }));
R2.displayName = Pf.displayName;
const A2 = w.forwardRef(({ className: e, ...t }, n) => /* @__PURE__ */ P(
  _f,
  {
    ref: n,
    className: M(
      "aspect-square h-4 w-4 rounded-full border border-primary text-primary ring-offset-background focus:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50",
      e
    ),
    ...t,
    children: /* @__PURE__ */ P(N2, { className: "flex items-center justify-center", children: /* @__PURE__ */ P(vr, { className: "h-2.5 w-2.5 fill-current text-current" }) })
  }
));
A2.displayName = _f.displayName;
const {
  createElement: hn,
  createContext: M2,
  createRef: AE,
  forwardRef: Tf,
  useCallback: Be,
  useContext: Nf,
  useEffect: jt,
  useImperativeHandle: Rf,
  useLayoutEffect: D2,
  useMemo: I2,
  useRef: je,
  useState: ir
} = w, gi = w.useId, Or = M2(null);
Or.displayName = "PanelGroupContext";
const co = D2, O2 = typeof gi == "function" ? gi : () => null;
let k2 = 0;
function is(e = null) {
  const t = O2(), n = je(e || t || null);
  return n.current === null && (n.current = "" + k2++), e ?? n.current;
}
function Af({
  children: e,
  className: t = "",
  collapsedSize: n,
  collapsible: o,
  defaultSize: r,
  forwardedRef: a,
  id: c,
  maxSize: s,
  minSize: i,
  onCollapse: l,
  onExpand: u,
  onResize: d,
  order: f,
  style: m,
  tagName: b = "div",
  ...p
}) {
  const g = Nf(Or);
  if (g === null)
    throw Error("Panel components must be rendered within a PanelGroup container");
  const {
    collapsePanel: h,
    expandPanel: $,
    getPanelSize: x,
    getPanelStyle: C,
    groupId: y,
    isPanelCollapsed: E,
    reevaluatePanelConstraints: T,
    registerPanel: R,
    resizePanel: N,
    unregisterPanel: H
  } = g, K = is(c), I = je({
    callbacks: {
      onCollapse: l,
      onExpand: u,
      onResize: d
    },
    constraints: {
      collapsedSize: n,
      collapsible: o,
      defaultSize: r,
      maxSize: s,
      minSize: i
    },
    id: K,
    idIsFromProps: c !== void 0,
    order: f
  });
  je({
    didLogMissingDefaultSizeWarning: !1
  }), co(() => {
    const {
      callbacks: D,
      constraints: V
    } = I.current, J = {
      ...V
    };
    I.current.id = K, I.current.idIsFromProps = c !== void 0, I.current.order = f, D.onCollapse = l, D.onExpand = u, D.onResize = d, V.collapsedSize = n, V.collapsible = o, V.defaultSize = r, V.maxSize = s, V.minSize = i, (J.collapsedSize !== V.collapsedSize || J.collapsible !== V.collapsible || J.maxSize !== V.maxSize || J.minSize !== V.minSize) && T(I.current, J);
  }), co(() => {
    const D = I.current;
    return R(D), () => {
      H(D);
    };
  }, [f, K, R, H]), Rf(a, () => ({
    collapse: () => {
      h(I.current);
    },
    expand: () => {
      $(I.current);
    },
    getId() {
      return K;
    },
    getSize() {
      return x(I.current);
    },
    isCollapsed() {
      return E(I.current);
    },
    isExpanded() {
      return !E(I.current);
    },
    resize: (D) => {
      N(I.current, D);
    }
  }), [h, $, x, E, K, N]);
  const Q = C(I.current, r);
  return hn(b, {
    ...p,
    children: e,
    className: t,
    style: {
      ...Q,
      ...m
    },
    // CSS selectors
    "data-panel": "",
    "data-panel-id": K,
    "data-panel-group-id": y,
    // e2e test attributes
    "data-panel-collapsible": void 0,
    "data-panel-size": void 0
  });
}
const Mf = Tf((e, t) => hn(Af, {
  ...e,
  forwardedRef: t
}));
Af.displayName = "Panel";
Mf.displayName = "forwardRef(Panel)";
function pe(e, t = "Assertion failed!") {
  if (!e)
    throw console.error(t), Error(t);
}
const Df = 10;
function so(e, t, n = Df) {
  e = parseFloat(e.toFixed(n)), t = parseFloat(t.toFixed(n));
  const o = e - t;
  return o === 0 ? 0 : o > 0 ? 1 : -1;
}
function We(e, t, n) {
  return so(e, t, n) === 0;
}
function pn({
  panelConstraints: e,
  panelIndex: t,
  size: n
}) {
  const o = e[t];
  pe(o != null);
  let {
    collapsedSize: r = 0,
    collapsible: a,
    maxSize: c = 100,
    minSize: s = 0
  } = o;
  if (so(n, s) < 0)
    if (a) {
      const i = (r + s) / 2;
      so(n, i) < 0 ? n = r : n = s;
    } else
      n = s;
  return n = Math.min(c, n), n = parseFloat(n.toFixed(Df)), n;
}
function Kn({
  delta: e,
  layout: t,
  panelConstraints: n,
  pivotIndices: o,
  trigger: r
}) {
  if (We(e, 0))
    return t;
  const a = [...t], [c, s] = o;
  pe(c != null), pe(s != null);
  let i = 0;
  if (r === "keyboard") {
    {
      const u = e < 0 ? s : c, d = n[u];
      if (pe(d), d.collapsible) {
        const f = t[u];
        pe(f != null);
        const m = n[u];
        pe(m);
        const {
          collapsedSize: b = 0,
          minSize: p = 0
        } = m;
        if (We(f, b)) {
          const g = p - f;
          so(g, Math.abs(e)) > 0 && (e = e < 0 ? 0 - g : g);
        }
      }
    }
    {
      const u = e < 0 ? c : s, d = n[u];
      pe(d);
      const {
        collapsible: f
      } = d;
      if (f) {
        const m = t[u];
        pe(m != null);
        const b = n[u];
        pe(b);
        const {
          collapsedSize: p = 0,
          minSize: g = 0
        } = b;
        if (We(m, g)) {
          const h = m - p;
          so(h, Math.abs(e)) > 0 && (e = e < 0 ? 0 - h : h);
        }
      }
    }
  }
  {
    const u = e < 0 ? 1 : -1;
    let d = e < 0 ? s : c, f = 0;
    for (; ; ) {
      const b = t[d];
      pe(b != null);
      const g = pn({
        panelConstraints: n,
        panelIndex: d,
        size: 100
      }) - b;
      if (f += g, d += u, d < 0 || d >= n.length)
        break;
    }
    const m = Math.min(Math.abs(e), Math.abs(f));
    e = e < 0 ? 0 - m : m;
  }
  {
    let d = e < 0 ? c : s;
    for (; d >= 0 && d < n.length; ) {
      const f = Math.abs(e) - Math.abs(i), m = t[d];
      pe(m != null);
      const b = m - f, p = pn({
        panelConstraints: n,
        panelIndex: d,
        size: b
      });
      if (!We(m, p) && (i += m - p, a[d] = p, i.toPrecision(3).localeCompare(Math.abs(e).toPrecision(3), void 0, {
        numeric: !0
      }) >= 0))
        break;
      e < 0 ? d-- : d++;
    }
  }
  if (We(i, 0))
    return t;
  {
    const u = e < 0 ? s : c, d = t[u];
    pe(d != null);
    const f = d + i, m = pn({
      panelConstraints: n,
      panelIndex: u,
      size: f
    });
    if (a[u] = m, !We(m, f)) {
      let b = f - m, g = e < 0 ? s : c;
      for (; g >= 0 && g < n.length; ) {
        const h = a[g];
        pe(h != null);
        const $ = h + b, x = pn({
          panelConstraints: n,
          panelIndex: g,
          size: $
        });
        if (We(h, x) || (b -= x - h, a[g] = x), We(b, 0))
          break;
        e > 0 ? g-- : g++;
      }
    }
  }
  const l = a.reduce((u, d) => d + u, 0);
  return We(l, 100) ? a : t;
}
function L2({
  layout: e,
  panelsArray: t,
  pivotIndices: n
}) {
  let o = 0, r = 100, a = 0, c = 0;
  const s = n[0];
  pe(s != null), t.forEach((d, f) => {
    const {
      constraints: m
    } = d, {
      maxSize: b = 100,
      minSize: p = 0
    } = m;
    f === s ? (o = p, r = b) : (a += p, c += b);
  });
  const i = Math.min(r, 100 - a), l = Math.max(o, 100 - c), u = e[s];
  return {
    valueMax: i,
    valueMin: l,
    valueNow: u
  };
}
function io(e, t = document) {
  return Array.from(t.querySelectorAll(`[data-panel-resize-handle-id][data-panel-group-id="${e}"]`));
}
function If(e, t, n = document) {
  const r = io(e, n).findIndex((a) => a.getAttribute("data-panel-resize-handle-id") === t);
  return r ?? null;
}
function Of(e, t, n) {
  const o = If(e, t, n);
  return o != null ? [o, o + 1] : [-1, -1];
}
function kf(e, t = document) {
  var n;
  if (t instanceof HTMLElement && (t == null || (n = t.dataset) === null || n === void 0 ? void 0 : n.panelGroupId) == e)
    return t;
  const o = t.querySelector(`[data-panel-group][data-panel-group-id="${e}"]`);
  return o || null;
}
function kr(e, t = document) {
  const n = t.querySelector(`[data-panel-resize-handle-id="${e}"]`);
  return n || null;
}
function F2(e, t, n, o = document) {
  var r, a, c, s;
  const i = kr(t, o), l = io(e, o), u = i ? l.indexOf(i) : -1, d = (r = (a = n[u]) === null || a === void 0 ? void 0 : a.id) !== null && r !== void 0 ? r : null, f = (c = (s = n[u + 1]) === null || s === void 0 ? void 0 : s.id) !== null && c !== void 0 ? c : null;
  return [d, f];
}
function z2({
  committedValuesRef: e,
  eagerValuesRef: t,
  groupId: n,
  layout: o,
  panelDataArray: r,
  panelGroupElement: a,
  setLayout: c
}) {
  je({
    didWarnAboutMissingResizeHandle: !1
  }), co(() => {
    if (!a)
      return;
    const s = io(n, a);
    for (let i = 0; i < r.length - 1; i++) {
      const {
        valueMax: l,
        valueMin: u,
        valueNow: d
      } = L2({
        layout: o,
        panelsArray: r,
        pivotIndices: [i, i + 1]
      }), f = s[i];
      if (f != null) {
        const m = r[i];
        pe(m), f.setAttribute("aria-controls", m.id), f.setAttribute("aria-valuemax", "" + Math.round(l)), f.setAttribute("aria-valuemin", "" + Math.round(u)), f.setAttribute("aria-valuenow", d != null ? "" + Math.round(d) : "");
      }
    }
    return () => {
      s.forEach((i, l) => {
        i.removeAttribute("aria-controls"), i.removeAttribute("aria-valuemax"), i.removeAttribute("aria-valuemin"), i.removeAttribute("aria-valuenow");
      });
    };
  }, [n, o, r, a]), jt(() => {
    if (!a)
      return;
    const s = t.current;
    pe(s);
    const {
      panelDataArray: i
    } = s, l = kf(n, a);
    pe(l != null, `No group found for id "${n}"`);
    const u = io(n, a);
    pe(u);
    const d = u.map((f) => {
      const m = f.getAttribute("data-panel-resize-handle-id");
      pe(m);
      const [b, p] = F2(n, m, i, a);
      if (b == null || p == null)
        return () => {
        };
      const g = (h) => {
        if (!h.defaultPrevented)
          switch (h.key) {
            case "Enter": {
              h.preventDefault();
              const $ = i.findIndex((x) => x.id === b);
              if ($ >= 0) {
                const x = i[$];
                pe(x);
                const C = o[$], {
                  collapsedSize: y = 0,
                  collapsible: E,
                  minSize: T = 0
                } = x.constraints;
                if (C != null && E) {
                  const R = Kn({
                    delta: We(C, y) ? T - y : y - C,
                    layout: o,
                    panelConstraints: i.map((N) => N.constraints),
                    pivotIndices: Of(n, m, a),
                    trigger: "keyboard"
                  });
                  o !== R && c(R);
                }
              }
              break;
            }
          }
      };
      return f.addEventListener("keydown", g), () => {
        f.removeEventListener("keydown", g);
      };
    });
    return () => {
      d.forEach((f) => f());
    };
  }, [a, e, t, n, o, r, c]);
}
function hi(e, t) {
  if (e.length !== t.length)
    return !1;
  for (let n = 0; n < e.length; n++)
    if (e[n] !== t[n])
      return !1;
  return !0;
}
function Lf(e) {
  return e.type === "keydown";
}
function Ff(e) {
  return e.type.startsWith("mouse");
}
function zf(e) {
  return e.type.startsWith("touch");
}
function Vf(e, t) {
  const n = e === "horizontal";
  if (Ff(t))
    return n ? t.clientX : t.clientY;
  if (zf(t)) {
    const o = t.touches[0];
    return pe(o), n ? o.screenX : o.screenY;
  } else
    throw Error(`Unsupported event type "${t.type}"`);
}
function V2(e, t, n, o, r) {
  const a = n === "horizontal", c = kr(t, r);
  pe(c);
  const s = c.getAttribute("data-panel-group-id");
  pe(s);
  let {
    initialCursorPosition: i
  } = o;
  const l = Vf(n, e), u = kf(s, r);
  pe(u);
  const d = u.getBoundingClientRect(), f = a ? d.width : d.height;
  return (l - i) / f * 100;
}
function H2(e, t, n, o, r, a) {
  if (Lf(e)) {
    const c = n === "horizontal";
    let s = 0;
    e.shiftKey ? s = 100 : r != null ? s = r : s = 10;
    let i = 0;
    switch (e.key) {
      case "ArrowDown":
        i = c ? 0 : s;
        break;
      case "ArrowLeft":
        i = c ? -s : 0;
        break;
      case "ArrowRight":
        i = c ? s : 0;
        break;
      case "ArrowUp":
        i = c ? 0 : -s;
        break;
      case "End":
        i = 100;
        break;
      case "Home":
        i = -100;
        break;
    }
    return i;
  } else
    return o == null ? 0 : V2(e, t, n, o, a);
}
function B2({
  panelDataArray: e
}) {
  const t = Array(e.length), n = e.map((a) => a.constraints);
  let o = 0, r = 100;
  for (let a = 0; a < e.length; a++) {
    const c = n[a];
    pe(c);
    const {
      defaultSize: s
    } = c;
    s != null && (o++, t[a] = s, r -= s);
  }
  for (let a = 0; a < e.length; a++) {
    const c = n[a];
    pe(c);
    const {
      defaultSize: s
    } = c;
    if (s != null)
      continue;
    const i = e.length - o, l = r / i;
    o++, t[a] = l, r -= l;
  }
  return t;
}
function dn(e, t, n) {
  t.forEach((o, r) => {
    const a = e[r];
    pe(a);
    const {
      callbacks: c,
      constraints: s,
      id: i
    } = a, {
      collapsedSize: l = 0,
      collapsible: u
    } = s, d = n[i];
    if (d == null || o !== d) {
      n[i] = o;
      const {
        onCollapse: f,
        onExpand: m,
        onResize: b
      } = c;
      b && b(o, d), u && (f || m) && (m && (d == null || d === l) && o !== l && m(), f && (d == null || d !== l) && o === l && f());
    }
  });
}
function Go(e, t) {
  if (e.length !== t.length)
    return !1;
  for (let n = 0; n < e.length; n++)
    if (e[n] != t[n])
      return !1;
  return !0;
}
function K2({
  defaultSize: e,
  dragState: t,
  layout: n,
  panelData: o,
  panelIndex: r,
  precision: a = 3
}) {
  const c = n[r];
  let s;
  return c == null ? s = e ?? "1" : o.length === 1 ? s = "1" : s = c.toPrecision(a), {
    flexBasis: 0,
    flexGrow: s,
    flexShrink: 1,
    // Without this, Panel sizes may be unintentionally overridden by their content
    overflow: "hidden",
    // Disable pointer events inside of a panel during resize
    // This avoid edge cases like nested iframes
    pointerEvents: t !== null ? "none" : void 0
  };
}
let Ua = null, Ut = null;
function Hf(e) {
  switch (e) {
    case "horizontal":
      return "ew-resize";
    case "horizontal-max":
      return "w-resize";
    case "horizontal-min":
      return "e-resize";
    case "vertical":
      return "ns-resize";
    case "vertical-max":
      return "n-resize";
    case "vertical-min":
      return "s-resize";
  }
}
function G2() {
  Ut !== null && (document.head.removeChild(Ut), Ua = null, Ut = null);
}
function ba(e) {
  if (Ua === e)
    return;
  Ua = e;
  const t = Hf(e);
  Ut === null && (Ut = document.createElement("style"), document.head.appendChild(Ut)), Ut.innerHTML = `*{cursor: ${t}!important;}`;
}
function U2(e, t = 10) {
  let n = null;
  return (...r) => {
    n !== null && clearTimeout(n), n = setTimeout(() => {
      e(...r);
    }, t);
  };
}
function $i(e) {
  try {
    if (typeof localStorage < "u")
      e.getItem = (t) => localStorage.getItem(t), e.setItem = (t, n) => {
        localStorage.setItem(t, n);
      };
    else
      throw new Error("localStorage not supported in this environment");
  } catch (t) {
    console.error(t), e.getItem = () => null, e.setItem = () => {
    };
  }
}
function Bf(e) {
  return `react-resizable-panels:${e}`;
}
function Kf(e) {
  return e.map((t) => {
    const {
      constraints: n,
      id: o,
      idIsFromProps: r,
      order: a
    } = t;
    return r ? o : a ? `${a}:${JSON.stringify(n)}` : JSON.stringify(n);
  }).sort((t, n) => t.localeCompare(n)).join(",");
}
function Gf(e, t) {
  try {
    const n = Bf(e), o = t.getItem(n);
    if (o) {
      const r = JSON.parse(o);
      if (typeof r == "object" && r != null)
        return r;
    }
  } catch {
  }
  return null;
}
function W2(e, t, n) {
  var o, r;
  const a = (o = Gf(e, n)) !== null && o !== void 0 ? o : {}, c = Kf(t);
  return (r = a[c]) !== null && r !== void 0 ? r : null;
}
function j2(e, t, n, o, r) {
  var a;
  const c = Bf(e), s = Kf(t), i = (a = Gf(e, r)) !== null && a !== void 0 ? a : {};
  i[s] = {
    expandToSizes: Object.fromEntries(n.entries()),
    layout: o
  };
  try {
    r.setItem(c, JSON.stringify(i));
  } catch (l) {
    console.error(l);
  }
}
function xi({
  layout: e,
  panelConstraints: t
}) {
  const n = [...e], o = n.reduce((a, c) => a + c, 0);
  if (n.length !== t.length)
    throw Error(`Invalid ${t.length} panel layout: ${n.map((a) => `${a}%`).join(", ")}`);
  if (!We(o, 100))
    for (let a = 0; a < t.length; a++) {
      const c = n[a];
      pe(c != null);
      const s = 100 / o * c;
      n[a] = s;
    }
  let r = 0;
  for (let a = 0; a < t.length; a++) {
    const c = n[a];
    pe(c != null);
    const s = pn({
      panelConstraints: t,
      panelIndex: a,
      size: c
    });
    c != s && (r += c - s, n[a] = s);
  }
  if (!We(r, 0))
    for (let a = 0; a < t.length; a++) {
      const c = n[a];
      pe(c != null);
      const s = c + r, i = pn({
        panelConstraints: t,
        panelIndex: a,
        size: s
      });
      if (c !== i && (r -= i - c, n[a] = i, We(r, 0)))
        break;
    }
  return n;
}
const Y2 = 100, Gn = {
  getItem: (e) => ($i(Gn), Gn.getItem(e)),
  setItem: (e, t) => {
    $i(Gn), Gn.setItem(e, t);
  }
}, wi = {};
function Uf({
  autoSaveId: e = null,
  children: t,
  className: n = "",
  direction: o,
  forwardedRef: r,
  id: a = null,
  onLayout: c = null,
  keyboardResizeBy: s = null,
  storage: i = Gn,
  style: l,
  tagName: u = "div",
  ...d
}) {
  const f = is(a), m = je(null), [b, p] = ir(null), [g, h] = ir([]), $ = je({}), x = je(/* @__PURE__ */ new Map()), C = je(0), y = je({
    autoSaveId: e,
    direction: o,
    dragState: b,
    id: f,
    keyboardResizeBy: s,
    onLayout: c,
    storage: i
  }), E = je({
    layout: g,
    panelDataArray: [],
    panelDataArrayChanged: !1
  });
  je({
    didLogIdAndOrderWarning: !1,
    didLogPanelConstraintsWarning: !1,
    prevPanelIds: []
  }), Rf(r, () => ({
    getId: () => y.current.id,
    getLayout: () => {
      const {
        layout: L
      } = E.current;
      return L;
    },
    setLayout: (L) => {
      const {
        onLayout: z
      } = y.current, {
        layout: X,
        panelDataArray: ee
      } = E.current, B = xi({
        layout: L,
        panelConstraints: ee.map((U) => U.constraints)
      });
      hi(X, B) || (h(B), E.current.layout = B, z && z(B), dn(ee, B, $.current));
    }
  }), []), co(() => {
    y.current.autoSaveId = e, y.current.direction = o, y.current.dragState = b, y.current.id = f, y.current.onLayout = c, y.current.storage = i;
  }), z2({
    committedValuesRef: y,
    eagerValuesRef: E,
    groupId: f,
    layout: g,
    panelDataArray: E.current.panelDataArray,
    setLayout: h,
    panelGroupElement: m.current
  }), jt(() => {
    const {
      panelDataArray: L
    } = E.current;
    if (e) {
      if (g.length === 0 || g.length !== L.length)
        return;
      let z = wi[e];
      z == null && (z = U2(j2, Y2), wi[e] = z);
      const X = [...L], ee = new Map(x.current);
      z(e, X, ee, g, i);
    }
  }, [e, g, i]), jt(() => {
  });
  const T = Be((L) => {
    const {
      onLayout: z
    } = y.current, {
      layout: X,
      panelDataArray: ee
    } = E.current;
    if (L.constraints.collapsible) {
      const B = ee.map((ie) => ie.constraints), {
        collapsedSize: U = 0,
        panelSize: te,
        pivotIndices: ce
      } = Bt(ee, L, X);
      if (pe(te != null), te !== U) {
        x.current.set(L.id, te);
        const ne = fn(ee, L) === ee.length - 1 ? te - U : U - te, G = Kn({
          delta: ne,
          layout: X,
          panelConstraints: B,
          pivotIndices: ce,
          trigger: "imperative-api"
        });
        Go(X, G) || (h(G), E.current.layout = G, z && z(G), dn(ee, G, $.current));
      }
    }
  }, []), R = Be((L) => {
    const {
      onLayout: z
    } = y.current, {
      layout: X,
      panelDataArray: ee
    } = E.current;
    if (L.constraints.collapsible) {
      const B = ee.map((ne) => ne.constraints), {
        collapsedSize: U = 0,
        panelSize: te,
        minSize: ce = 0,
        pivotIndices: ie
      } = Bt(ee, L, X);
      if (te === U) {
        const ne = x.current.get(L.id), G = ne != null && ne >= ce ? ne : ce, ue = fn(ee, L) === ee.length - 1 ? te - G : G - te, fe = Kn({
          delta: ue,
          layout: X,
          panelConstraints: B,
          pivotIndices: ie,
          trigger: "imperative-api"
        });
        Go(X, fe) || (h(fe), E.current.layout = fe, z && z(fe), dn(ee, fe, $.current));
      }
    }
  }, []), N = Be((L) => {
    const {
      layout: z,
      panelDataArray: X
    } = E.current, {
      panelSize: ee
    } = Bt(X, L, z);
    return pe(ee != null), ee;
  }, []), H = Be((L, z) => {
    const {
      panelDataArray: X
    } = E.current, ee = fn(X, L);
    return K2({
      defaultSize: z,
      dragState: b,
      layout: g,
      panelData: X,
      panelIndex: ee
    });
  }, [b, g]), K = Be((L) => {
    const {
      layout: z,
      panelDataArray: X
    } = E.current, {
      collapsedSize: ee = 0,
      collapsible: B,
      panelSize: U
    } = Bt(X, L, z);
    return B === !0 && U === ee;
  }, []), I = Be((L) => {
    const {
      layout: z,
      panelDataArray: X
    } = E.current, {
      collapsedSize: ee = 0,
      collapsible: B,
      panelSize: U
    } = Bt(X, L, z);
    return pe(U != null), !B || U > ee;
  }, []), Q = Be((L) => {
    const {
      panelDataArray: z
    } = E.current;
    z.push(L), z.sort((X, ee) => {
      const B = X.order, U = ee.order;
      return B == null && U == null ? 0 : B == null ? -1 : U == null ? 1 : B - U;
    }), E.current.panelDataArrayChanged = !0;
  }, []);
  co(() => {
    if (E.current.panelDataArrayChanged) {
      E.current.panelDataArrayChanged = !1;
      const {
        autoSaveId: L,
        onLayout: z,
        storage: X
      } = y.current, {
        layout: ee,
        panelDataArray: B
      } = E.current;
      let U = null;
      if (L) {
        const ce = W2(L, B, X);
        ce && (x.current = new Map(Object.entries(ce.expandToSizes)), U = ce.layout);
      }
      U == null && (U = B2({
        panelDataArray: B
      }));
      const te = xi({
        layout: U,
        panelConstraints: B.map((ce) => ce.constraints)
      });
      hi(ee, te) || (h(te), E.current.layout = te, z && z(te), dn(B, te, $.current));
    }
  });
  const D = Be((L) => function(X) {
    X.preventDefault();
    const ee = m.current;
    if (!ee)
      return () => null;
    const {
      direction: B,
      dragState: U,
      id: te,
      keyboardResizeBy: ce,
      onLayout: ie
    } = y.current, {
      layout: ne,
      panelDataArray: G
    } = E.current, {
      initialLayout: de
    } = U ?? {}, ue = Of(te, L, ee);
    let fe = H2(X, L, B, U, ce, ee);
    if (fe === 0)
      return;
    const Te = B === "horizontal";
    document.dir === "rtl" && Te && (fe = -fe);
    const De = G.map((et) => et.constraints), Oe = Kn({
      delta: fe,
      layout: de ?? ne,
      panelConstraints: De,
      pivotIndices: ue,
      trigger: Lf(X) ? "keyboard" : "mouse-or-touch"
    }), Ae = !Go(ne, Oe);
    (Ff(X) || zf(X)) && C.current != fe && (C.current = fe, ba(Ae ? Te ? "horizontal" : "vertical" : Te ? fe < 0 ? "horizontal-min" : "horizontal-max" : fe < 0 ? "vertical-min" : "vertical-max")), Ae && (h(Oe), E.current.layout = Oe, ie && ie(Oe), dn(G, Oe, $.current));
  }, []), V = Be((L, z) => {
    const {
      onLayout: X
    } = y.current, {
      layout: ee,
      panelDataArray: B
    } = E.current, U = B.map((de) => de.constraints), {
      panelSize: te,
      pivotIndices: ce
    } = Bt(B, L, ee);
    pe(te != null);
    const ne = fn(B, L) === B.length - 1 ? te - z : z - te, G = Kn({
      delta: ne,
      layout: ee,
      panelConstraints: U,
      pivotIndices: ce,
      trigger: "imperative-api"
    });
    Go(ee, G) || (h(G), E.current.layout = G, X && X(G), dn(B, G, $.current));
  }, []), J = Be((L, z) => {
    const {
      layout: X,
      panelDataArray: ee
    } = E.current, {
      collapsedSize: B = 0,
      collapsible: U
    } = z, {
      collapsedSize: te = 0,
      collapsible: ce,
      maxSize: ie = 100,
      minSize: ne = 0
    } = L.constraints, {
      panelSize: G
    } = Bt(ee, L, X);
    pe(G != null), U && ce && G === B ? B !== te && V(L, te) : G < ne ? V(L, ne) : G > ie && V(L, ie);
  }, [V]), oe = Be((L, z) => {
    const {
      direction: X
    } = y.current, {
      layout: ee
    } = E.current;
    if (!m.current)
      return;
    const B = kr(L, m.current);
    pe(B);
    const U = Vf(X, z);
    p({
      dragHandleId: L,
      dragHandleRect: B.getBoundingClientRect(),
      initialCursorPosition: U,
      initialLayout: ee
    });
  }, []), se = Be(() => {
    G2(), p(null);
  }, []), Y = Be((L) => {
    const {
      panelDataArray: z
    } = E.current, X = fn(z, L);
    X >= 0 && (z.splice(X, 1), delete $.current[L.id], E.current.panelDataArrayChanged = !0);
  }, []), k = I2(() => ({
    collapsePanel: T,
    direction: o,
    dragState: b,
    expandPanel: R,
    getPanelSize: N,
    getPanelStyle: H,
    groupId: f,
    isPanelCollapsed: K,
    isPanelExpanded: I,
    reevaluatePanelConstraints: J,
    registerPanel: Q,
    registerResizeHandle: D,
    resizePanel: V,
    startDragging: oe,
    stopDragging: se,
    unregisterPanel: Y,
    panelGroupElement: m.current
  }), [T, b, o, R, N, H, f, K, I, J, Q, D, V, oe, se, Y]), W = {
    display: "flex",
    flexDirection: o === "horizontal" ? "row" : "column",
    height: "100%",
    overflow: "hidden",
    width: "100%"
  };
  return hn(Or.Provider, {
    value: k
  }, hn(u, {
    ...d,
    children: t,
    className: n,
    style: {
      ...W,
      ...l
    },
    ref: m,
    // CSS selectors
    "data-panel-group": "",
    "data-panel-group-direction": o,
    "data-panel-group-id": f
  }));
}
const Wf = Tf((e, t) => hn(Uf, {
  ...e,
  forwardedRef: t
}));
Uf.displayName = "PanelGroup";
Wf.displayName = "forwardRef(PanelGroup)";
function fn(e, t) {
  return e.findIndex((n) => n === t || n.id === t.id);
}
function Bt(e, t, n) {
  const o = fn(e, t), a = o === e.length - 1 ? [o - 1, o] : [o, o + 1], c = n[o];
  return {
    ...t.constraints,
    panelSize: c,
    pivotIndices: a
  };
}
function X2({
  disabled: e,
  handleId: t,
  resizeHandler: n,
  panelGroupElement: o
}) {
  jt(() => {
    if (e || n == null || o == null)
      return;
    const r = kr(t, o);
    if (r == null)
      return;
    const a = (c) => {
      if (!c.defaultPrevented)
        switch (c.key) {
          case "ArrowDown":
          case "ArrowLeft":
          case "ArrowRight":
          case "ArrowUp":
          case "End":
          case "Home": {
            c.preventDefault(), n(c);
            break;
          }
          case "F6": {
            c.preventDefault();
            const s = r.getAttribute("data-panel-group-id");
            pe(s);
            const i = io(s, o), l = If(s, t, o);
            pe(l !== null);
            const u = c.shiftKey ? l > 0 ? l - 1 : i.length - 1 : l + 1 < i.length ? l + 1 : 0;
            i[u].focus();
            break;
          }
        }
    };
    return r.addEventListener("keydown", a), () => {
      r.removeEventListener("keydown", a);
    };
  }, [o, e, t, n]);
}
function jf({
  children: e = null,
  className: t = "",
  disabled: n = !1,
  id: o,
  onDragging: r,
  style: a = {},
  tabIndex: c = 0,
  tagName: s = "div",
  ...i
}) {
  const l = je(null), u = je({
    onDragging: r
  });
  jt(() => {
    u.current.onDragging = r;
  });
  const d = Nf(Or);
  if (d === null)
    throw Error("PanelResizeHandle components must be rendered within a PanelGroup container");
  const {
    direction: f,
    dragState: m,
    groupId: b,
    registerResizeHandle: p,
    startDragging: g,
    stopDragging: h,
    panelGroupElement: $
  } = d, x = is(o), C = (m == null ? void 0 : m.dragHandleId) === x, [y, E] = ir(!1), [T, R] = ir(null), N = Be(() => {
    const K = l.current;
    pe(K), K.blur(), h();
    const {
      onDragging: I
    } = u.current;
    I && I(!1);
  }, [h]);
  jt(() => {
    if (n)
      R(null);
    else {
      const K = p(x);
      R(() => K);
    }
  }, [n, x, p]), jt(() => {
    if (n || T == null || !C)
      return;
    const K = (V) => {
      T(V);
    }, I = (V) => {
      T(V);
    }, Q = l.current;
    pe(Q);
    const D = Q.ownerDocument;
    return D.body.addEventListener("contextmenu", N), D.body.addEventListener("mousemove", K), D.body.addEventListener("touchmove", K), D.body.addEventListener("mouseleave", I), window.addEventListener("mouseup", N), window.addEventListener("touchend", N), () => {
      D.body.removeEventListener("contextmenu", N), D.body.removeEventListener("mousemove", K), D.body.removeEventListener("touchmove", K), D.body.removeEventListener("mouseleave", I), window.removeEventListener("mouseup", N), window.removeEventListener("touchend", N);
    };
  }, [f, n, C, T, N]), X2({
    disabled: n,
    handleId: x,
    resizeHandler: T,
    panelGroupElement: $
  });
  const H = {
    cursor: Hf(f),
    touchAction: "none",
    userSelect: "none"
  };
  return hn(s, {
    ...i,
    children: e,
    className: t,
    onBlur: () => E(!1),
    onFocus: () => E(!0),
    onMouseDown: (K) => {
      g(x, K.nativeEvent);
      const I = u.current;
      pe(I);
      const {
        onDragging: Q
      } = I;
      Q && Q(!0);
    },
    onMouseUp: N,
    onTouchCancel: N,
    onTouchEnd: N,
    onTouchStart: (K) => {
      g(x, K.nativeEvent);
      const I = u.current;
      pe(I);
      const {
        onDragging: Q
      } = I;
      Q && Q(!0);
    },
    ref: l,
    role: "separator",
    style: {
      ...H,
      ...a
    },
    tabIndex: c,
    // CSS selectors
    "data-panel-group-direction": f,
    "data-panel-group-id": b,
    "data-resize-handle": "",
    "data-resize-handle-active": C ? "pointer" : y ? "keyboard" : void 0,
    "data-panel-resize-handle-enabled": !n,
    "data-panel-resize-handle-id": x
  });
}
jf.displayName = "PanelResizeHandle";
function ME({
  className: e,
  ...t
}) {
  return /* @__PURE__ */ P(
    Wf,
    {
      className: M(
        "flex h-full w-full data-[panel-group-direction=vertical]:flex-col",
        e
      ),
      ...t
    }
  );
}
const DE = Mf;
function IE({
  withHandle: e,
  className: t,
  ...n
}) {
  return /* @__PURE__ */ P(
    jf,
    {
      className: M(
        "relative flex w-px items-center justify-center bg-border after:absolute after:inset-y-0 after:left-1/2 after:w-1 after:-translate-x-1/2 focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring focus-visible:ring-offset-1 data-[panel-group-direction=vertical]:h-px data-[panel-group-direction=vertical]:w-full data-[panel-group-direction=vertical]:after:left-0 data-[panel-group-direction=vertical]:after:h-1 data-[panel-group-direction=vertical]:after:w-full data-[panel-group-direction=vertical]:after:-translate-y-1/2 data-[panel-group-direction=vertical]:after:translate-x-0 [&[data-panel-group-direction=vertical]>div]:rotate-90",
        t
      ),
      ...n,
      children: e && /* @__PURE__ */ P(
        "div",
        {
          className: "z-10 flex h-4 w-3 items-center justify-center rounded-sm border bg-border",
          children: /* @__PURE__ */ P(pb, { className: "h-2.5 w-2.5" })
        }
      )
    }
  );
}
function lo(e, [t, n]) {
  return Math.min(n, Math.max(t, e));
}
function q2(e, t) {
  return ec((n, o) => {
    const r = t[n][o];
    return r ?? n;
  }, e);
}
const Yf = "ScrollArea", [Xf, OE] = we(Yf), [Z2, Je] = Xf(Yf), Q2 = /* @__PURE__ */ _((e, t) => {
  const { __scopeScrollArea: n, type: o = "hover", dir: r, scrollHideDelay: a = 600, ...c } = e, [s, i] = q(null), [l, u] = q(null), [d, f] = q(null), [m, b] = q(null), [p, g] = q(null), [h, $] = q(0), [x, C] = q(0), [y, E] = q(!1), [T, R] = q(!1), N = ae(
    t,
    (K) => i(K)
  ), H = rt(r);
  return /* @__PURE__ */ v(Z2, {
    scope: n,
    type: o,
    dir: H,
    scrollHideDelay: a,
    scrollArea: s,
    viewport: l,
    onViewportChange: u,
    content: d,
    onContentChange: f,
    scrollbarX: m,
    onScrollbarXChange: b,
    scrollbarXEnabled: y,
    onScrollbarXEnabledChange: E,
    scrollbarY: p,
    onScrollbarYChange: g,
    scrollbarYEnabled: T,
    onScrollbarYEnabledChange: R,
    onCornerWidthChange: $,
    onCornerHeightChange: C
  }, /* @__PURE__ */ v(Z.div, S({
    dir: H
  }, c, {
    ref: N,
    style: {
      position: "relative",
      // Pass corner sizes as CSS vars to reduce re-renders of context consumers
      "--radix-scroll-area-corner-width": h + "px",
      "--radix-scroll-area-corner-height": x + "px",
      ...e.style
    }
  })));
}), J2 = "ScrollAreaViewport", e5 = /* @__PURE__ */ _((e, t) => {
  const { __scopeScrollArea: n, children: o, ...r } = e, a = Je(J2, n), c = A(null), s = ae(t, c, a.onViewportChange);
  return /* @__PURE__ */ v(Ge, null, /* @__PURE__ */ v("style", {
    dangerouslySetInnerHTML: {
      __html: "[data-radix-scroll-area-viewport]{scrollbar-width:none;-ms-overflow-style:none;-webkit-overflow-scrolling:touch;}[data-radix-scroll-area-viewport]::-webkit-scrollbar{display:none}"
    }
  }), /* @__PURE__ */ v(Z.div, S({
    "data-radix-scroll-area-viewport": ""
  }, r, {
    ref: s,
    style: {
      /**
      * We don't support `visible` because the intention is to have at least one scrollbar
      * if this component is used and `visible` will behave like `auto` in that case
      * https://developer.mozilla.org/en-US/docs/Web/CSS/overflowed#description
      *
      * We don't handle `auto` because the intention is for the native implementation
      * to be hidden if using this component. We just want to ensure the node is scrollable
      * so could have used either `scroll` or `auto` here. We picked `scroll` to prevent
      * the browser from having to work out whether to render native scrollbars or not,
      * we tell it to with the intention of hiding them in CSS.
      */
      overflowX: a.scrollbarXEnabled ? "scroll" : "hidden",
      overflowY: a.scrollbarYEnabled ? "scroll" : "hidden",
      ...e.style
    }
  }), /* @__PURE__ */ v("div", {
    ref: a.onContentChange,
    style: {
      minWidth: "100%",
      display: "table"
    }
  }, o)));
}), St = "ScrollAreaScrollbar", qf = /* @__PURE__ */ _((e, t) => {
  const { forceMount: n, ...o } = e, r = Je(St, e.__scopeScrollArea), { onScrollbarXEnabledChange: a, onScrollbarYEnabledChange: c } = r, s = e.orientation === "horizontal";
  return j(() => (s ? a(!0) : c(!0), () => {
    s ? a(!1) : c(!1);
  }), [
    s,
    a,
    c
  ]), r.type === "hover" ? /* @__PURE__ */ v(t5, S({}, o, {
    ref: t,
    forceMount: n
  })) : r.type === "scroll" ? /* @__PURE__ */ v(n5, S({}, o, {
    ref: t,
    forceMount: n
  })) : r.type === "auto" ? /* @__PURE__ */ v(Zf, S({}, o, {
    ref: t,
    forceMount: n
  })) : r.type === "always" ? /* @__PURE__ */ v(ls, S({}, o, {
    ref: t
  })) : null;
}), t5 = /* @__PURE__ */ _((e, t) => {
  const { forceMount: n, ...o } = e, r = Je(St, e.__scopeScrollArea), [a, c] = q(!1);
  return j(() => {
    const s = r.scrollArea;
    let i = 0;
    if (s) {
      const l = () => {
        window.clearTimeout(i), c(!0);
      }, u = () => {
        i = window.setTimeout(
          () => c(!1),
          r.scrollHideDelay
        );
      };
      return s.addEventListener("pointerenter", l), s.addEventListener("pointerleave", u), () => {
        window.clearTimeout(i), s.removeEventListener("pointerenter", l), s.removeEventListener("pointerleave", u);
      };
    }
  }, [
    r.scrollArea,
    r.scrollHideDelay
  ]), /* @__PURE__ */ v(Ee, {
    present: n || a
  }, /* @__PURE__ */ v(Zf, S({
    "data-state": a ? "visible" : "hidden"
  }, o, {
    ref: t
  })));
}), n5 = /* @__PURE__ */ _((e, t) => {
  const { forceMount: n, ...o } = e, r = Je(St, e.__scopeScrollArea), a = e.orientation === "horizontal", c = Fr(
    () => i("SCROLL_END"),
    100
  ), [s, i] = q2("hidden", {
    hidden: {
      SCROLL: "scrolling"
    },
    scrolling: {
      SCROLL_END: "idle",
      POINTER_ENTER: "interacting"
    },
    interacting: {
      SCROLL: "interacting",
      POINTER_LEAVE: "idle"
    },
    idle: {
      HIDE: "hidden",
      SCROLL: "scrolling",
      POINTER_ENTER: "interacting"
    }
  });
  return j(() => {
    if (s === "idle") {
      const l = window.setTimeout(
        () => i("HIDE"),
        r.scrollHideDelay
      );
      return () => window.clearTimeout(l);
    }
  }, [
    s,
    r.scrollHideDelay,
    i
  ]), j(() => {
    const l = r.viewport, u = a ? "scrollLeft" : "scrollTop";
    if (l) {
      let d = l[u];
      const f = () => {
        const m = l[u];
        d !== m && (i("SCROLL"), c()), d = m;
      };
      return l.addEventListener("scroll", f), () => l.removeEventListener("scroll", f);
    }
  }, [
    r.viewport,
    a,
    i,
    c
  ]), /* @__PURE__ */ v(Ee, {
    present: n || s !== "hidden"
  }, /* @__PURE__ */ v(ls, S({
    "data-state": s === "hidden" ? "hidden" : "visible"
  }, o, {
    ref: t,
    onPointerEnter: O(
      e.onPointerEnter,
      () => i("POINTER_ENTER")
    ),
    onPointerLeave: O(
      e.onPointerLeave,
      () => i("POINTER_LEAVE")
    )
  })));
}), Zf = /* @__PURE__ */ _((e, t) => {
  const n = Je(St, e.__scopeScrollArea), { forceMount: o, ...r } = e, [a, c] = q(!1), s = e.orientation === "horizontal", i = Fr(() => {
    if (n.viewport) {
      const l = n.viewport.offsetWidth < n.viewport.scrollWidth, u = n.viewport.offsetHeight < n.viewport.scrollHeight;
      c(s ? l : u);
    }
  }, 10);
  return $n(n.viewport, i), $n(n.content, i), /* @__PURE__ */ v(Ee, {
    present: o || a
  }, /* @__PURE__ */ v(ls, S({
    "data-state": a ? "visible" : "hidden"
  }, r, {
    ref: t
  })));
}), ls = /* @__PURE__ */ _((e, t) => {
  const { orientation: n = "vertical", ...o } = e, r = Je(St, e.__scopeScrollArea), a = A(null), c = A(0), [s, i] = q({
    content: 0,
    viewport: 0,
    scrollbar: {
      size: 0,
      paddingStart: 0,
      paddingEnd: 0
    }
  }), l = tp(s.viewport, s.content), u = {
    ...o,
    sizes: s,
    onSizesChange: i,
    hasThumb: l > 0 && l < 1,
    onThumbChange: (f) => a.current = f,
    onThumbPointerUp: () => c.current = 0,
    onThumbPointerDown: (f) => c.current = f
  };
  function d(f, m) {
    return d5(f, c.current, s, m);
  }
  return n === "horizontal" ? /* @__PURE__ */ v(o5, S({}, u, {
    ref: t,
    onThumbPositionChange: () => {
      if (r.viewport && a.current) {
        const f = r.viewport.scrollLeft, m = yi(f, s, r.dir);
        a.current.style.transform = `translate3d(${m}px, 0, 0)`;
      }
    },
    onWheelScroll: (f) => {
      r.viewport && (r.viewport.scrollLeft = f);
    },
    onDragScroll: (f) => {
      r.viewport && (r.viewport.scrollLeft = d(f, r.dir));
    }
  })) : n === "vertical" ? /* @__PURE__ */ v(r5, S({}, u, {
    ref: t,
    onThumbPositionChange: () => {
      if (r.viewport && a.current) {
        const f = r.viewport.scrollTop, m = yi(f, s);
        a.current.style.transform = `translate3d(0, ${m}px, 0)`;
      }
    },
    onWheelScroll: (f) => {
      r.viewport && (r.viewport.scrollTop = f);
    },
    onDragScroll: (f) => {
      r.viewport && (r.viewport.scrollTop = d(f));
    }
  })) : null;
}), o5 = /* @__PURE__ */ _((e, t) => {
  const { sizes: n, onSizesChange: o, ...r } = e, a = Je(St, e.__scopeScrollArea), [c, s] = q(), i = A(null), l = ae(t, i, a.onScrollbarXChange);
  return j(() => {
    i.current && s(getComputedStyle(i.current));
  }, [
    i
  ]), /* @__PURE__ */ v(Jf, S({
    "data-orientation": "horizontal"
  }, r, {
    ref: l,
    sizes: n,
    style: {
      bottom: 0,
      left: a.dir === "rtl" ? "var(--radix-scroll-area-corner-width)" : 0,
      right: a.dir === "ltr" ? "var(--radix-scroll-area-corner-width)" : 0,
      "--radix-scroll-area-thumb-width": Lr(n) + "px",
      ...e.style
    },
    onThumbPointerDown: (u) => e.onThumbPointerDown(u.x),
    onDragScroll: (u) => e.onDragScroll(u.x),
    onWheelScroll: (u, d) => {
      if (a.viewport) {
        const f = a.viewport.scrollLeft + u.deltaX;
        e.onWheelScroll(f), op(f, d) && u.preventDefault();
      }
    },
    onResize: () => {
      i.current && a.viewport && c && o({
        content: a.viewport.scrollWidth,
        viewport: a.viewport.offsetWidth,
        scrollbar: {
          size: i.current.clientWidth,
          paddingStart: lr(c.paddingLeft),
          paddingEnd: lr(c.paddingRight)
        }
      });
    }
  }));
}), r5 = /* @__PURE__ */ _((e, t) => {
  const { sizes: n, onSizesChange: o, ...r } = e, a = Je(St, e.__scopeScrollArea), [c, s] = q(), i = A(null), l = ae(t, i, a.onScrollbarYChange);
  return j(() => {
    i.current && s(getComputedStyle(i.current));
  }, [
    i
  ]), /* @__PURE__ */ v(Jf, S({
    "data-orientation": "vertical"
  }, r, {
    ref: l,
    sizes: n,
    style: {
      top: 0,
      right: a.dir === "ltr" ? 0 : void 0,
      left: a.dir === "rtl" ? 0 : void 0,
      bottom: "var(--radix-scroll-area-corner-height)",
      "--radix-scroll-area-thumb-height": Lr(n) + "px",
      ...e.style
    },
    onThumbPointerDown: (u) => e.onThumbPointerDown(u.y),
    onDragScroll: (u) => e.onDragScroll(u.y),
    onWheelScroll: (u, d) => {
      if (a.viewport) {
        const f = a.viewport.scrollTop + u.deltaY;
        e.onWheelScroll(f), op(f, d) && u.preventDefault();
      }
    },
    onResize: () => {
      i.current && a.viewport && c && o({
        content: a.viewport.scrollHeight,
        viewport: a.viewport.offsetHeight,
        scrollbar: {
          size: i.current.clientHeight,
          paddingStart: lr(c.paddingTop),
          paddingEnd: lr(c.paddingBottom)
        }
      });
    }
  }));
}), [a5, Qf] = Xf(St), Jf = /* @__PURE__ */ _((e, t) => {
  const { __scopeScrollArea: n, sizes: o, hasThumb: r, onThumbChange: a, onThumbPointerUp: c, onThumbPointerDown: s, onThumbPositionChange: i, onDragScroll: l, onWheelScroll: u, onResize: d, ...f } = e, m = Je(St, n), [b, p] = q(null), g = ae(
    t,
    (N) => p(N)
  ), h = A(null), $ = A(""), x = m.viewport, C = o.content - o.viewport, y = ge(u), E = ge(i), T = Fr(d, 10);
  function R(N) {
    if (h.current) {
      const H = N.clientX - h.current.left, K = N.clientY - h.current.top;
      l({
        x: H,
        y: K
      });
    }
  }
  return j(() => {
    const N = (H) => {
      const K = H.target;
      (b == null ? void 0 : b.contains(K)) && y(H, C);
    };
    return document.addEventListener("wheel", N, {
      passive: !1
    }), () => document.removeEventListener("wheel", N, {
      passive: !1
    });
  }, [
    x,
    b,
    C,
    y
  ]), j(E, [
    o,
    E
  ]), $n(b, T), $n(m.content, T), /* @__PURE__ */ v(a5, {
    scope: n,
    scrollbar: b,
    hasThumb: r,
    onThumbChange: ge(a),
    onThumbPointerUp: ge(c),
    onThumbPositionChange: E,
    onThumbPointerDown: ge(s)
  }, /* @__PURE__ */ v(Z.div, S({}, f, {
    ref: g,
    style: {
      position: "absolute",
      ...f.style
    },
    onPointerDown: O(e.onPointerDown, (N) => {
      N.button === 0 && (N.target.setPointerCapture(N.pointerId), h.current = b.getBoundingClientRect(), $.current = document.body.style.webkitUserSelect, document.body.style.webkitUserSelect = "none", m.viewport && (m.viewport.style.scrollBehavior = "auto"), R(N));
    }),
    onPointerMove: O(e.onPointerMove, R),
    onPointerUp: O(e.onPointerUp, (N) => {
      const H = N.target;
      H.hasPointerCapture(N.pointerId) && H.releasePointerCapture(N.pointerId), document.body.style.webkitUserSelect = $.current, m.viewport && (m.viewport.style.scrollBehavior = ""), h.current = null;
    })
  })));
}), Wa = "ScrollAreaThumb", c5 = /* @__PURE__ */ _((e, t) => {
  const { forceMount: n, ...o } = e, r = Qf(Wa, e.__scopeScrollArea);
  return /* @__PURE__ */ v(Ee, {
    present: n || r.hasThumb
  }, /* @__PURE__ */ v(s5, S({
    ref: t
  }, o)));
}), s5 = /* @__PURE__ */ _((e, t) => {
  const { __scopeScrollArea: n, style: o, ...r } = e, a = Je(Wa, n), c = Qf(Wa, n), { onThumbPositionChange: s } = c, i = ae(
    t,
    (d) => c.onThumbChange(d)
  ), l = A(), u = Fr(() => {
    l.current && (l.current(), l.current = void 0);
  }, 100);
  return j(() => {
    const d = a.viewport;
    if (d) {
      const f = () => {
        if (u(), !l.current) {
          const m = u5(d, s);
          l.current = m, s();
        }
      };
      return s(), d.addEventListener("scroll", f), () => d.removeEventListener("scroll", f);
    }
  }, [
    a.viewport,
    u,
    s
  ]), /* @__PURE__ */ v(Z.div, S({
    "data-state": c.hasThumb ? "visible" : "hidden"
  }, r, {
    ref: i,
    style: {
      width: "var(--radix-scroll-area-thumb-width)",
      height: "var(--radix-scroll-area-thumb-height)",
      ...o
    },
    onPointerDownCapture: O(e.onPointerDownCapture, (d) => {
      const m = d.target.getBoundingClientRect(), b = d.clientX - m.left, p = d.clientY - m.top;
      c.onThumbPointerDown({
        x: b,
        y: p
      });
    }),
    onPointerUp: O(e.onPointerUp, c.onThumbPointerUp)
  }));
}), ep = "ScrollAreaCorner", i5 = /* @__PURE__ */ _((e, t) => {
  const n = Je(ep, e.__scopeScrollArea), o = !!(n.scrollbarX && n.scrollbarY);
  return n.type !== "scroll" && o ? /* @__PURE__ */ v(l5, S({}, e, {
    ref: t
  })) : null;
}), l5 = /* @__PURE__ */ _((e, t) => {
  const { __scopeScrollArea: n, ...o } = e, r = Je(ep, n), [a, c] = q(0), [s, i] = q(0), l = !!(a && s);
  return $n(r.scrollbarX, () => {
    var u;
    const d = ((u = r.scrollbarX) === null || u === void 0 ? void 0 : u.offsetHeight) || 0;
    r.onCornerHeightChange(d), i(d);
  }), $n(r.scrollbarY, () => {
    var u;
    const d = ((u = r.scrollbarY) === null || u === void 0 ? void 0 : u.offsetWidth) || 0;
    r.onCornerWidthChange(d), c(d);
  }), l ? /* @__PURE__ */ v(Z.div, S({}, o, {
    ref: t,
    style: {
      width: a,
      height: s,
      position: "absolute",
      right: r.dir === "ltr" ? 0 : void 0,
      left: r.dir === "rtl" ? 0 : void 0,
      bottom: 0,
      ...e.style
    }
  })) : null;
});
function lr(e) {
  return e ? parseInt(e, 10) : 0;
}
function tp(e, t) {
  const n = e / t;
  return isNaN(n) ? 0 : n;
}
function Lr(e) {
  const t = tp(e.viewport, e.content), n = e.scrollbar.paddingStart + e.scrollbar.paddingEnd, o = (e.scrollbar.size - n) * t;
  return Math.max(o, 18);
}
function d5(e, t, n, o = "ltr") {
  const r = Lr(n), a = r / 2, c = t || a, s = r - c, i = n.scrollbar.paddingStart + c, l = n.scrollbar.size - n.scrollbar.paddingEnd - s, u = n.content - n.viewport, d = o === "ltr" ? [
    0,
    u
  ] : [
    u * -1,
    0
  ];
  return np([
    i,
    l
  ], d)(e);
}
function yi(e, t, n = "ltr") {
  const o = Lr(t), r = t.scrollbar.paddingStart + t.scrollbar.paddingEnd, a = t.scrollbar.size - r, c = t.content - t.viewport, s = a - o, i = n === "ltr" ? [
    0,
    c
  ] : [
    c * -1,
    0
  ], l = lo(e, i);
  return np([
    0,
    c
  ], [
    0,
    s
  ])(l);
}
function np(e, t) {
  return (n) => {
    if (e[0] === e[1] || t[0] === t[1])
      return t[0];
    const o = (t[1] - t[0]) / (e[1] - e[0]);
    return t[0] + o * (n - e[0]);
  };
}
function op(e, t) {
  return e > 0 && e < t;
}
const u5 = (e, t = () => {
}) => {
  let n = {
    left: e.scrollLeft,
    top: e.scrollTop
  }, o = 0;
  return function r() {
    const a = {
      left: e.scrollLeft,
      top: e.scrollTop
    }, c = n.left !== a.left, s = n.top !== a.top;
    (c || s) && t(), n = a, o = window.requestAnimationFrame(r);
  }(), () => window.cancelAnimationFrame(o);
};
function Fr(e, t) {
  const n = ge(e), o = A(0);
  return j(
    () => () => window.clearTimeout(o.current),
    []
  ), re(() => {
    window.clearTimeout(o.current), o.current = window.setTimeout(n, t);
  }, [
    n,
    t
  ]);
}
function $n(e, t) {
  const n = ge(t);
  Re(() => {
    let o = 0;
    if (e) {
      const r = new ResizeObserver(() => {
        cancelAnimationFrame(o), o = window.requestAnimationFrame(n);
      });
      return r.observe(e), () => {
        window.cancelAnimationFrame(o), r.unobserve(e);
      };
    }
  }, [
    e,
    n
  ]);
}
const rp = Q2, f5 = e5, p5 = i5, ap = w.forwardRef(({ className: e, orientation: t = "vertical", ...n }, o) => /* @__PURE__ */ P(
  qf,
  {
    ref: o,
    orientation: t,
    className: M(
      "flex touch-none select-none transition-colors",
      t === "vertical" && "h-full w-2.5 border-l border-l-transparent p-[1px]",
      t === "horizontal" && "h-2.5 flex-col border-t border-t-transparent p-[1px]",
      e
    ),
    ...n,
    children: /* @__PURE__ */ P(c5, { className: "relative flex-1 rounded-full bg-border" })
  }
)), m5 = w.forwardRef(({ className: e, children: t, ...n }, o) => /* @__PURE__ */ ve(
  rp,
  {
    ref: o,
    className: M("relative overflow-hidden", e),
    ...n,
    children: [
      /* @__PURE__ */ P(f5, { className: "h-full w-full rounded-[inherit]", children: t }),
      /* @__PURE__ */ P(ap, {}),
      /* @__PURE__ */ P(p5, {})
    ]
  }
));
m5.displayName = rp.displayName;
ap.displayName = qf.displayName;
const b5 = [
  " ",
  "Enter",
  "ArrowUp",
  "ArrowDown"
], v5 = [
  " ",
  "Enter"
], zr = "Select", [Vr, Hr, g5] = wt(zr), [Dn, kE] = we(zr, [
  g5,
  lt
]), ds = lt(), [h5, nn] = Dn(zr), [$5, x5] = Dn(zr), w5 = (e) => {
  const { __scopeSelect: t, children: n, open: o, defaultOpen: r, onOpenChange: a, value: c, defaultValue: s, onValueChange: i, dir: l, name: u, autoComplete: d, disabled: f, required: m } = e, b = ds(t), [p, g] = q(null), [h, $] = q(null), [x, C] = q(!1), y = rt(l), [E = !1, T] = Se({
    prop: o,
    defaultProp: r,
    onChange: a
  }), [R, N] = Se({
    prop: c,
    defaultProp: s,
    onChange: i
  }), H = A(null), K = p ? !!p.closest("form") : !0, [I, Q] = q(/* @__PURE__ */ new Set()), D = Array.from(I).map(
    (V) => V.props.value
  ).join(";");
  return /* @__PURE__ */ v(An, b, /* @__PURE__ */ v(h5, {
    required: m,
    scope: t,
    trigger: p,
    onTriggerChange: g,
    valueNode: h,
    onValueNodeChange: $,
    valueNodeHasChildren: x,
    onValueNodeHasChildrenChange: C,
    contentId: Me(),
    value: R,
    onValueChange: N,
    open: E,
    onOpenChange: T,
    dir: y,
    triggerPointerDownPosRef: H,
    disabled: f
  }, /* @__PURE__ */ v(Vr.Provider, {
    scope: t
  }, /* @__PURE__ */ v($5, {
    scope: e.__scopeSelect,
    onNativeOptionAdd: re((V) => {
      Q(
        (J) => new Set(J).add(V)
      );
    }, []),
    onNativeOptionRemove: re((V) => {
      Q((J) => {
        const oe = new Set(J);
        return oe.delete(V), oe;
      });
    }, [])
  }, n)), K ? /* @__PURE__ */ v(dp, {
    key: D,
    "aria-hidden": !0,
    required: m,
    tabIndex: -1,
    name: u,
    autoComplete: d,
    value: R,
    onChange: (V) => N(V.target.value),
    disabled: f
  }, R === void 0 ? /* @__PURE__ */ v("option", {
    value: ""
  }) : null, Array.from(I)) : null));
}, y5 = "SelectTrigger", C5 = /* @__PURE__ */ _((e, t) => {
  const { __scopeSelect: n, disabled: o = !1, ...r } = e, a = ds(n), c = nn(y5, n), s = c.disabled || o, i = ae(t, c.onTriggerChange), l = Hr(n), [u, d, f] = up((b) => {
    const p = l().filter(
      ($) => !$.disabled
    ), g = p.find(
      ($) => $.value === c.value
    ), h = fp(p, b, g);
    h !== void 0 && c.onValueChange(h.value);
  }), m = () => {
    s || (c.onOpenChange(!0), f());
  };
  return /* @__PURE__ */ v(yo, S({
    asChild: !0
  }, a), /* @__PURE__ */ v(Z.button, S({
    type: "button",
    role: "combobox",
    "aria-controls": c.contentId,
    "aria-expanded": c.open,
    "aria-required": c.required,
    "aria-autocomplete": "none",
    dir: c.dir,
    "data-state": c.open ? "open" : "closed",
    disabled: s,
    "data-disabled": s ? "" : void 0,
    "data-placeholder": lp(c.value) ? "" : void 0
  }, r, {
    ref: i,
    onClick: O(r.onClick, (b) => {
      b.currentTarget.focus();
    }),
    onPointerDown: O(r.onPointerDown, (b) => {
      const p = b.target;
      p.hasPointerCapture(b.pointerId) && p.releasePointerCapture(b.pointerId), b.button === 0 && b.ctrlKey === !1 && (m(), c.triggerPointerDownPosRef.current = {
        x: Math.round(b.pageX),
        y: Math.round(b.pageY)
      }, b.preventDefault());
    }),
    onKeyDown: O(r.onKeyDown, (b) => {
      const p = u.current !== "";
      !(b.ctrlKey || b.altKey || b.metaKey) && b.key.length === 1 && d(b.key), !(p && b.key === " ") && b5.includes(b.key) && (m(), b.preventDefault());
    })
  })));
}), S5 = "SelectValue", E5 = /* @__PURE__ */ _((e, t) => {
  const { __scopeSelect: n, className: o, style: r, children: a, placeholder: c = "", ...s } = e, i = nn(S5, n), { onValueNodeHasChildrenChange: l } = i, u = a !== void 0, d = ae(t, i.onValueNodeChange);
  return Re(() => {
    l(u);
  }, [
    l,
    u
  ]), /* @__PURE__ */ v(Z.span, S({}, s, {
    ref: d,
    style: {
      pointerEvents: "none"
    }
  }), lp(i.value) ? /* @__PURE__ */ v(Ge, null, c) : a);
}), P5 = /* @__PURE__ */ _((e, t) => {
  const { __scopeSelect: n, children: o, ...r } = e;
  return /* @__PURE__ */ v(Z.span, S({
    "aria-hidden": !0
  }, r, {
    ref: t
  }), o || "▼");
}), _5 = (e) => /* @__PURE__ */ v(mo, S({
  asChild: !0
}, e)), xn = "SelectContent", T5 = /* @__PURE__ */ _((e, t) => {
  const n = nn(xn, e.__scopeSelect), [o, r] = q();
  if (Re(() => {
    r(new DocumentFragment());
  }, []), !n.open) {
    const a = o;
    return a ? /* @__PURE__ */ nc(/* @__PURE__ */ v(cp, {
      scope: e.__scopeSelect
    }, /* @__PURE__ */ v(Vr.Slot, {
      scope: e.__scopeSelect
    }, /* @__PURE__ */ v("div", null, e.children))), a) : null;
  }
  return /* @__PURE__ */ v(N5, S({}, e, {
    ref: t
  }));
}), vt = 10, [cp, on] = Dn(xn), N5 = /* @__PURE__ */ _((e, t) => {
  const {
    __scopeSelect: n,
    position: o = "item-aligned",
    onCloseAutoFocus: r,
    onEscapeKeyDown: a,
    onPointerDownOutside: c,
    side: s,
    sideOffset: i,
    align: l,
    alignOffset: u,
    arrowPadding: d,
    collisionBoundary: f,
    collisionPadding: m,
    sticky: b,
    hideWhenDetached: p,
    avoidCollisions: g,
    //
    ...h
  } = e, $ = nn(xn, n), [x, C] = q(null), [y, E] = q(null), T = ae(
    t,
    (U) => C(U)
  ), [R, N] = q(null), [H, K] = q(null), I = Hr(n), [Q, D] = q(!1), V = A(!1);
  j(() => {
    if (x)
      return bo(x);
  }, [
    x
  ]), hr();
  const J = re((U) => {
    const [te, ...ce] = I().map(
      (G) => G.ref.current
    ), [ie] = ce.slice(-1), ne = document.activeElement;
    for (const G of U)
      if (G === ne || (G == null || G.scrollIntoView({
        block: "nearest"
      }), G === te && y && (y.scrollTop = 0), G === ie && y && (y.scrollTop = y.scrollHeight), G == null || G.focus(), document.activeElement !== ne))
        return;
  }, [
    I,
    y
  ]), oe = re(
    () => J([
      R,
      x
    ]),
    [
      J,
      R,
      x
    ]
  );
  j(() => {
    Q && oe();
  }, [
    Q,
    oe
  ]);
  const { onOpenChange: se, triggerPointerDownPosRef: Y } = $;
  j(() => {
    if (x) {
      let U = {
        x: 0,
        y: 0
      };
      const te = (ie) => {
        var ne, G, de, ue;
        U = {
          x: Math.abs(Math.round(ie.pageX) - ((ne = (G = Y.current) === null || G === void 0 ? void 0 : G.x) !== null && ne !== void 0 ? ne : 0)),
          y: Math.abs(Math.round(ie.pageY) - ((de = (ue = Y.current) === null || ue === void 0 ? void 0 : ue.y) !== null && de !== void 0 ? de : 0))
        };
      }, ce = (ie) => {
        U.x <= 10 && U.y <= 10 ? ie.preventDefault() : x.contains(ie.target) || se(!1), document.removeEventListener("pointermove", te), Y.current = null;
      };
      return Y.current !== null && (document.addEventListener("pointermove", te), document.addEventListener("pointerup", ce, {
        capture: !0,
        once: !0
      })), () => {
        document.removeEventListener("pointermove", te), document.removeEventListener("pointerup", ce, {
          capture: !0
        });
      };
    }
  }, [
    x,
    se,
    Y
  ]), j(() => {
    const U = () => se(!1);
    return window.addEventListener("blur", U), window.addEventListener("resize", U), () => {
      window.removeEventListener("blur", U), window.removeEventListener("resize", U);
    };
  }, [
    se
  ]);
  const [k, W] = up((U) => {
    const te = I().filter(
      (ne) => !ne.disabled
    ), ce = te.find(
      (ne) => ne.ref.current === document.activeElement
    ), ie = fp(te, U, ce);
    ie && setTimeout(
      () => ie.ref.current.focus()
    );
  }), L = re((U, te, ce) => {
    const ie = !V.current && !ce;
    ($.value !== void 0 && $.value === te || ie) && (N(U), ie && (V.current = !0));
  }, [
    $.value
  ]), z = re(
    () => x == null ? void 0 : x.focus(),
    [
      x
    ]
  ), X = re((U, te, ce) => {
    const ie = !V.current && !ce;
    ($.value !== void 0 && $.value === te || ie) && K(U);
  }, [
    $.value
  ]), ee = o === "popper" ? Ci : R5, B = ee === Ci ? {
    side: s,
    sideOffset: i,
    align: l,
    alignOffset: u,
    arrowPadding: d,
    collisionBoundary: f,
    collisionPadding: m,
    sticky: b,
    hideWhenDetached: p,
    avoidCollisions: g
  } : {};
  return /* @__PURE__ */ v(cp, {
    scope: n,
    content: x,
    viewport: y,
    onViewportChange: E,
    itemRefCallback: L,
    selectedItem: R,
    onItemLeave: z,
    itemTextRefCallback: X,
    focusSelectedItem: oe,
    selectedItemText: H,
    position: o,
    isPositioned: Q,
    searchRef: k
  }, /* @__PURE__ */ v(xr, {
    as: gt,
    allowPinchZoom: !0
  }, /* @__PURE__ */ v(gr, {
    asChild: !0,
    trapped: $.open,
    onMountAutoFocus: (U) => {
      U.preventDefault();
    },
    onUnmountAutoFocus: O(r, (U) => {
      var te;
      (te = $.trigger) === null || te === void 0 || te.focus({
        preventScroll: !0
      }), U.preventDefault();
    })
  }, /* @__PURE__ */ v(Ot, {
    asChild: !0,
    disableOutsidePointerEvents: !0,
    onEscapeKeyDown: a,
    onPointerDownOutside: c,
    onFocusOutside: (U) => U.preventDefault(),
    onDismiss: () => $.onOpenChange(!1)
  }, /* @__PURE__ */ v(ee, S({
    role: "listbox",
    id: $.contentId,
    "data-state": $.open ? "open" : "closed",
    dir: $.dir,
    onContextMenu: (U) => U.preventDefault()
  }, h, B, {
    onPlaced: () => D(!0),
    ref: T,
    style: {
      // flex layout so we can place the scroll buttons properly
      display: "flex",
      flexDirection: "column",
      // reset the outline by default as the content MAY get focused
      outline: "none",
      ...h.style
    },
    onKeyDown: O(h.onKeyDown, (U) => {
      const te = U.ctrlKey || U.altKey || U.metaKey;
      if (U.key === "Tab" && U.preventDefault(), !te && U.key.length === 1 && W(U.key), [
        "ArrowUp",
        "ArrowDown",
        "Home",
        "End"
      ].includes(U.key)) {
        let ie = I().filter(
          (ne) => !ne.disabled
        ).map(
          (ne) => ne.ref.current
        );
        if ([
          "ArrowUp",
          "End"
        ].includes(U.key) && (ie = ie.slice().reverse()), [
          "ArrowUp",
          "ArrowDown"
        ].includes(U.key)) {
          const ne = U.target, G = ie.indexOf(ne);
          ie = ie.slice(G + 1);
        }
        setTimeout(
          () => J(ie)
        ), U.preventDefault();
      }
    })
  }))))));
}), R5 = /* @__PURE__ */ _((e, t) => {
  const { __scopeSelect: n, onPlaced: o, ...r } = e, a = nn(xn, n), c = on(xn, n), [s, i] = q(null), [l, u] = q(null), d = ae(
    t,
    (T) => u(T)
  ), f = Hr(n), m = A(!1), b = A(!0), { viewport: p, selectedItem: g, selectedItemText: h, focusSelectedItem: $ } = c, x = re(() => {
    if (a.trigger && a.valueNode && s && l && p && g && h) {
      const T = a.trigger.getBoundingClientRect(), R = l.getBoundingClientRect(), N = a.valueNode.getBoundingClientRect(), H = h.getBoundingClientRect();
      if (a.dir !== "rtl") {
        const ne = H.left - R.left, G = N.left - ne, de = T.left - G, ue = T.width + de, fe = Math.max(ue, R.width), Te = window.innerWidth - vt, De = lo(G, [
          vt,
          Te - fe
        ]);
        s.style.minWidth = ue + "px", s.style.left = De + "px";
      } else {
        const ne = R.right - H.right, G = window.innerWidth - N.right - ne, de = window.innerWidth - T.right - G, ue = T.width + de, fe = Math.max(ue, R.width), Te = window.innerWidth - vt, De = lo(G, [
          vt,
          Te - fe
        ]);
        s.style.minWidth = ue + "px", s.style.right = De + "px";
      }
      const K = f(), I = window.innerHeight - vt * 2, Q = p.scrollHeight, D = window.getComputedStyle(l), V = parseInt(D.borderTopWidth, 10), J = parseInt(D.paddingTop, 10), oe = parseInt(D.borderBottomWidth, 10), se = parseInt(D.paddingBottom, 10), Y = V + J + Q + se + oe, k = Math.min(g.offsetHeight * 5, Y), W = window.getComputedStyle(p), L = parseInt(W.paddingTop, 10), z = parseInt(W.paddingBottom, 10), X = T.top + T.height / 2 - vt, ee = I - X, B = g.offsetHeight / 2, U = g.offsetTop + B, te = V + J + U, ce = Y - te;
      if (te <= X) {
        const ne = g === K[K.length - 1].ref.current;
        s.style.bottom = "0px";
        const G = l.clientHeight - p.offsetTop - p.offsetHeight, de = Math.max(ee, B + (ne ? z : 0) + G + oe), ue = te + de;
        s.style.height = ue + "px";
      } else {
        const ne = g === K[0].ref.current;
        s.style.top = "0px";
        const de = Math.max(X, V + p.offsetTop + (ne ? L : 0) + B) + ce;
        s.style.height = de + "px", p.scrollTop = te - X + p.offsetTop;
      }
      s.style.margin = `${vt}px 0`, s.style.minHeight = k + "px", s.style.maxHeight = I + "px", o == null || o(), requestAnimationFrame(
        () => m.current = !0
      );
    }
  }, [
    f,
    a.trigger,
    a.valueNode,
    s,
    l,
    p,
    g,
    h,
    a.dir,
    o
  ]);
  Re(
    () => x(),
    [
      x
    ]
  );
  const [C, y] = q();
  Re(() => {
    l && y(window.getComputedStyle(l).zIndex);
  }, [
    l
  ]);
  const E = re((T) => {
    T && b.current === !0 && (x(), $ == null || $(), b.current = !1);
  }, [
    x,
    $
  ]);
  return /* @__PURE__ */ v(A5, {
    scope: n,
    contentWrapper: s,
    shouldExpandOnScrollRef: m,
    onScrollButtonChange: E
  }, /* @__PURE__ */ v("div", {
    ref: i,
    style: {
      display: "flex",
      flexDirection: "column",
      position: "fixed",
      zIndex: C
    }
  }, /* @__PURE__ */ v(Z.div, S({}, r, {
    ref: d,
    style: {
      // When we get the height of the content, it includes borders. If we were to set
      // the height without having `boxSizing: 'border-box'` it would be too big.
      boxSizing: "border-box",
      // We need to ensure the content doesn't get taller than the wrapper
      maxHeight: "100%",
      ...r.style
    }
  }))));
}), Ci = /* @__PURE__ */ _((e, t) => {
  const { __scopeSelect: n, align: o = "start", collisionPadding: r = vt, ...a } = e, c = ds(n);
  return /* @__PURE__ */ v(Co, S({}, c, a, {
    ref: t,
    align: o,
    collisionPadding: r,
    style: {
      // Ensure border-box for floating-ui calculations
      boxSizing: "border-box",
      ...a.style,
      "--radix-select-content-transform-origin": "var(--radix-popper-transform-origin)",
      "--radix-select-content-available-width": "var(--radix-popper-available-width)",
      "--radix-select-content-available-height": "var(--radix-popper-available-height)",
      "--radix-select-trigger-width": "var(--radix-popper-anchor-width)",
      "--radix-select-trigger-height": "var(--radix-popper-anchor-height)"
    }
  }));
}), [A5, us] = Dn(xn, {}), Si = "SelectViewport", M5 = /* @__PURE__ */ _((e, t) => {
  const { __scopeSelect: n, ...o } = e, r = on(Si, n), a = us(Si, n), c = ae(t, r.onViewportChange), s = A(0);
  return /* @__PURE__ */ v(Ge, null, /* @__PURE__ */ v("style", {
    dangerouslySetInnerHTML: {
      __html: "[data-radix-select-viewport]{scrollbar-width:none;-ms-overflow-style:none;-webkit-overflow-scrolling:touch;}[data-radix-select-viewport]::-webkit-scrollbar{display:none}"
    }
  }), /* @__PURE__ */ v(Vr.Slot, {
    scope: n
  }, /* @__PURE__ */ v(Z.div, S({
    "data-radix-select-viewport": "",
    role: "presentation"
  }, o, {
    ref: c,
    style: {
      // we use position: 'relative' here on the `viewport` so that when we call
      // `selectedItem.offsetTop` in calculations, the offset is relative to the viewport
      // (independent of the scrollUpButton).
      position: "relative",
      flex: 1,
      overflow: "auto",
      ...o.style
    },
    onScroll: O(o.onScroll, (i) => {
      const l = i.currentTarget, { contentWrapper: u, shouldExpandOnScrollRef: d } = a;
      if (d != null && d.current && u) {
        const f = Math.abs(s.current - l.scrollTop);
        if (f > 0) {
          const m = window.innerHeight - vt * 2, b = parseFloat(u.style.minHeight), p = parseFloat(u.style.height), g = Math.max(b, p);
          if (g < m) {
            const h = g + f, $ = Math.min(m, h), x = h - $;
            u.style.height = $ + "px", u.style.bottom === "0px" && (l.scrollTop = x > 0 ? x : 0, u.style.justifyContent = "flex-end");
          }
        }
      }
      s.current = l.scrollTop;
    })
  }))));
}), D5 = "SelectGroup", [I5, O5] = Dn(D5), k5 = /* @__PURE__ */ _((e, t) => {
  const { __scopeSelect: n, ...o } = e, r = Me();
  return /* @__PURE__ */ v(I5, {
    scope: n,
    id: r
  }, /* @__PURE__ */ v(Z.div, S({
    role: "group",
    "aria-labelledby": r
  }, o, {
    ref: t
  })));
}), L5 = "SelectLabel", F5 = /* @__PURE__ */ _((e, t) => {
  const { __scopeSelect: n, ...o } = e, r = O5(L5, n);
  return /* @__PURE__ */ v(Z.div, S({
    id: r.id
  }, o, {
    ref: t
  }));
}), ja = "SelectItem", [z5, sp] = Dn(ja), V5 = /* @__PURE__ */ _((e, t) => {
  const { __scopeSelect: n, value: o, disabled: r = !1, textValue: a, ...c } = e, s = nn(ja, n), i = on(ja, n), l = s.value === o, [u, d] = q(a ?? ""), [f, m] = q(!1), b = ae(t, (h) => {
    var $;
    return ($ = i.itemRefCallback) === null || $ === void 0 ? void 0 : $.call(i, h, o, r);
  }), p = Me(), g = () => {
    r || (s.onValueChange(o), s.onOpenChange(!1));
  };
  if (o === "")
    throw new Error("A <Select.Item /> must have a value prop that is not an empty string. This is because the Select value can be set to an empty string to clear the selection and show the placeholder.");
  return /* @__PURE__ */ v(z5, {
    scope: n,
    value: o,
    disabled: r,
    textId: p,
    isSelected: l,
    onItemTextChange: re((h) => {
      d(($) => {
        var x;
        return $ || ((x = h == null ? void 0 : h.textContent) !== null && x !== void 0 ? x : "").trim();
      });
    }, [])
  }, /* @__PURE__ */ v(Vr.ItemSlot, {
    scope: n,
    value: o,
    disabled: r,
    textValue: u
  }, /* @__PURE__ */ v(Z.div, S({
    role: "option",
    "aria-labelledby": p,
    "data-highlighted": f ? "" : void 0,
    "aria-selected": l && f,
    "data-state": l ? "checked" : "unchecked",
    "aria-disabled": r || void 0,
    "data-disabled": r ? "" : void 0,
    tabIndex: r ? void 0 : -1
  }, c, {
    ref: b,
    onFocus: O(
      c.onFocus,
      () => m(!0)
    ),
    onBlur: O(
      c.onBlur,
      () => m(!1)
    ),
    onPointerUp: O(c.onPointerUp, g),
    onPointerMove: O(c.onPointerMove, (h) => {
      if (r) {
        var $;
        ($ = i.onItemLeave) === null || $ === void 0 || $.call(i);
      } else
        h.currentTarget.focus({
          preventScroll: !0
        });
    }),
    onPointerLeave: O(c.onPointerLeave, (h) => {
      if (h.currentTarget === document.activeElement) {
        var $;
        ($ = i.onItemLeave) === null || $ === void 0 || $.call(i);
      }
    }),
    onKeyDown: O(c.onKeyDown, (h) => {
      var $;
      (($ = i.searchRef) === null || $ === void 0 ? void 0 : $.current) !== "" && h.key === " " || (v5.includes(h.key) && g(), h.key === " " && h.preventDefault());
    })
  }))));
}), Uo = "SelectItemText", H5 = /* @__PURE__ */ _((e, t) => {
  const { __scopeSelect: n, className: o, style: r, ...a } = e, c = nn(Uo, n), s = on(Uo, n), i = sp(Uo, n), l = x5(Uo, n), [u, d] = q(null), f = ae(
    t,
    (h) => d(h),
    i.onItemTextChange,
    (h) => {
      var $;
      return ($ = s.itemTextRefCallback) === null || $ === void 0 ? void 0 : $.call(s, h, i.value, i.disabled);
    }
  ), m = u == null ? void 0 : u.textContent, b = Fe(
    () => /* @__PURE__ */ v("option", {
      key: i.value,
      value: i.value,
      disabled: i.disabled
    }, m),
    [
      i.disabled,
      i.value,
      m
    ]
  ), { onNativeOptionAdd: p, onNativeOptionRemove: g } = l;
  return Re(() => (p(b), () => g(b)), [
    p,
    g,
    b
  ]), /* @__PURE__ */ v(Ge, null, /* @__PURE__ */ v(Z.span, S({
    id: i.textId
  }, a, {
    ref: f
  })), i.isSelected && c.valueNode && !c.valueNodeHasChildren ? /* @__PURE__ */ nc(a.children, c.valueNode) : null);
}), B5 = "SelectItemIndicator", K5 = /* @__PURE__ */ _((e, t) => {
  const { __scopeSelect: n, ...o } = e;
  return sp(B5, n).isSelected ? /* @__PURE__ */ v(Z.span, S({
    "aria-hidden": !0
  }, o, {
    ref: t
  })) : null;
}), Ei = "SelectScrollUpButton", G5 = /* @__PURE__ */ _((e, t) => {
  const n = on(Ei, e.__scopeSelect), o = us(Ei, e.__scopeSelect), [r, a] = q(!1), c = ae(t, o.onScrollButtonChange);
  return Re(() => {
    if (n.viewport && n.isPositioned) {
      let i = function() {
        const l = s.scrollTop > 0;
        a(l);
      };
      const s = n.viewport;
      return i(), s.addEventListener("scroll", i), () => s.removeEventListener("scroll", i);
    }
  }, [
    n.viewport,
    n.isPositioned
  ]), r ? /* @__PURE__ */ v(ip, S({}, e, {
    ref: c,
    onAutoScroll: () => {
      const { viewport: s, selectedItem: i } = n;
      s && i && (s.scrollTop = s.scrollTop - i.offsetHeight);
    }
  })) : null;
}), Pi = "SelectScrollDownButton", U5 = /* @__PURE__ */ _((e, t) => {
  const n = on(Pi, e.__scopeSelect), o = us(Pi, e.__scopeSelect), [r, a] = q(!1), c = ae(t, o.onScrollButtonChange);
  return Re(() => {
    if (n.viewport && n.isPositioned) {
      let i = function() {
        const l = s.scrollHeight - s.clientHeight, u = Math.ceil(s.scrollTop) < l;
        a(u);
      };
      const s = n.viewport;
      return i(), s.addEventListener("scroll", i), () => s.removeEventListener("scroll", i);
    }
  }, [
    n.viewport,
    n.isPositioned
  ]), r ? /* @__PURE__ */ v(ip, S({}, e, {
    ref: c,
    onAutoScroll: () => {
      const { viewport: s, selectedItem: i } = n;
      s && i && (s.scrollTop = s.scrollTop + i.offsetHeight);
    }
  })) : null;
}), ip = /* @__PURE__ */ _((e, t) => {
  const { __scopeSelect: n, onAutoScroll: o, ...r } = e, a = on("SelectScrollButton", n), c = A(null), s = Hr(n), i = re(() => {
    c.current !== null && (window.clearInterval(c.current), c.current = null);
  }, []);
  return j(() => () => i(), [
    i
  ]), Re(() => {
    var l;
    const u = s().find(
      (d) => d.ref.current === document.activeElement
    );
    u == null || (l = u.ref.current) === null || l === void 0 || l.scrollIntoView({
      block: "nearest"
    });
  }, [
    s
  ]), /* @__PURE__ */ v(Z.div, S({
    "aria-hidden": !0
  }, r, {
    ref: t,
    style: {
      flexShrink: 0,
      ...r.style
    },
    onPointerDown: O(r.onPointerDown, () => {
      c.current === null && (c.current = window.setInterval(o, 50));
    }),
    onPointerMove: O(r.onPointerMove, () => {
      var l;
      (l = a.onItemLeave) === null || l === void 0 || l.call(a), c.current === null && (c.current = window.setInterval(o, 50));
    }),
    onPointerLeave: O(r.onPointerLeave, () => {
      i();
    })
  }));
}), W5 = /* @__PURE__ */ _((e, t) => {
  const { __scopeSelect: n, ...o } = e;
  return /* @__PURE__ */ v(Z.div, S({
    "aria-hidden": !0
  }, o, {
    ref: t
  }));
});
function lp(e) {
  return e === "" || e === void 0;
}
const dp = /* @__PURE__ */ _((e, t) => {
  const { value: n, ...o } = e, r = A(null), a = ae(t, r), c = _n(n);
  return j(() => {
    const s = r.current, i = window.HTMLSelectElement.prototype, u = Object.getOwnPropertyDescriptor(i, "value").set;
    if (c !== n && u) {
      const d = new Event("change", {
        bubbles: !0
      });
      u.call(s, n), s.dispatchEvent(d);
    }
  }, [
    c,
    n
  ]), /* @__PURE__ */ v(Dr, {
    asChild: !0
  }, /* @__PURE__ */ v("select", S({}, o, {
    ref: a,
    defaultValue: n
  })));
});
dp.displayName = "BubbleSelect";
function up(e) {
  const t = ge(e), n = A(""), o = A(0), r = re((c) => {
    const s = n.current + c;
    t(s), function i(l) {
      n.current = l, window.clearTimeout(o.current), l !== "" && (o.current = window.setTimeout(
        () => i(""),
        1e3
      ));
    }(s);
  }, [
    t
  ]), a = re(() => {
    n.current = "", window.clearTimeout(o.current);
  }, []);
  return j(() => () => window.clearTimeout(o.current), []), [
    n,
    r,
    a
  ];
}
function fp(e, t, n) {
  const r = t.length > 1 && Array.from(t).every(
    (l) => l === t[0]
  ) ? t[0] : t, a = n ? e.indexOf(n) : -1;
  let c = j5(e, Math.max(a, 0));
  r.length === 1 && (c = c.filter(
    (l) => l !== n
  ));
  const i = c.find(
    (l) => l.textValue.toLowerCase().startsWith(r.toLowerCase())
  );
  return i !== n ? i : void 0;
}
function j5(e, t) {
  return e.map(
    (n, o) => e[(t + o) % e.length]
  );
}
const Y5 = w5, pp = C5, X5 = E5, q5 = P5, Z5 = _5, mp = T5, Q5 = M5, J5 = k5, bp = F5, vp = V5, e6 = H5, t6 = K5, gp = G5, hp = U5, $p = W5, LE = Y5, FE = J5, zE = X5, n6 = w.forwardRef(({ className: e, children: t, ...n }, o) => /* @__PURE__ */ ve(
  pp,
  {
    ref: o,
    className: M(
      "flex h-10 w-full items-center justify-between rounded-md border border-input bg-background px-3 py-2 text-sm ring-offset-background placeholder:text-muted-foreground focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50 [&>span]:line-clamp-1",
      e
    ),
    ...n,
    children: [
      t,
      /* @__PURE__ */ P(q5, { asChild: !0, children: /* @__PURE__ */ P(mr, { className: "h-4 w-4 opacity-50" }) })
    ]
  }
));
n6.displayName = pp.displayName;
const xp = w.forwardRef(({ className: e, ...t }, n) => /* @__PURE__ */ P(
  gp,
  {
    ref: n,
    className: M("flex cursor-default items-center justify-center py-1", e),
    ...t,
    children: /* @__PURE__ */ P(fb, { className: "h-4 w-4" })
  }
));
xp.displayName = gp.displayName;
const wp = w.forwardRef(({ className: e, ...t }, n) => /* @__PURE__ */ P(
  hp,
  {
    ref: n,
    className: M("flex cursor-default items-center justify-center py-1", e),
    ...t,
    children: /* @__PURE__ */ P(mr, { className: "h-4 w-4" })
  }
));
wp.displayName = hp.displayName;
const o6 = w.forwardRef(({ className: e, children: t, position: n = "popper", ...o }, r) => /* @__PURE__ */ P(Z5, { children: /* @__PURE__ */ ve(
  mp,
  {
    ref: r,
    className: M(
      "relative z-50 max-h-96 min-w-[8rem] overflow-hidden rounded-md border bg-popover text-popover-foreground shadow-md data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",
      n === "popper" && "data-[side=bottom]:translate-y-1 data-[side=left]:-translate-x-1 data-[side=right]:translate-x-1 data-[side=top]:-translate-y-1",
      e
    ),
    position: n,
    ...o,
    children: [
      /* @__PURE__ */ P(xp, {}),
      /* @__PURE__ */ P(
        Q5,
        {
          className: M("p-1", n === "popper" && "h-[var(--radix-select-trigger-height)] w-full min-w-[var(--radix-select-trigger-width)]"),
          children: t
        }
      ),
      /* @__PURE__ */ P(wp, {})
    ]
  }
) }));
o6.displayName = mp.displayName;
const r6 = w.forwardRef(({ className: e, ...t }, n) => /* @__PURE__ */ P(
  bp,
  {
    ref: n,
    className: M("py-1.5 pl-8 pr-2 text-sm font-semibold", e),
    ...t
  }
));
r6.displayName = bp.displayName;
const a6 = w.forwardRef(({ className: e, children: t, ...n }, o) => /* @__PURE__ */ ve(
  vp,
  {
    ref: o,
    className: M(
      "relative flex w-full cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",
      e
    ),
    ...n,
    children: [
      /* @__PURE__ */ P("span", { className: "absolute left-2 flex h-3.5 w-3.5 items-center justify-center", children: /* @__PURE__ */ P(t6, { children: /* @__PURE__ */ P(po, { className: "h-4 w-4" }) }) }),
      /* @__PURE__ */ P(e6, { children: t })
    ]
  }
));
a6.displayName = vp.displayName;
const c6 = w.forwardRef(({ className: e, ...t }, n) => /* @__PURE__ */ P(
  $p,
  {
    ref: n,
    className: M("-mx-1 my-1 h-px bg-muted", e),
    ...t
  }
));
c6.displayName = $p.displayName;
const Ya = "horizontal", s6 = [
  "horizontal",
  "vertical"
], yp = /* @__PURE__ */ _((e, t) => {
  const { decorative: n, orientation: o = Ya, ...r } = e, a = Cp(o) ? o : Ya, s = n ? {
    role: "none"
  } : {
    "aria-orientation": a === "vertical" ? a : void 0,
    role: "separator"
  };
  return /* @__PURE__ */ v(Z.div, S({
    "data-orientation": a
  }, s, r, {
    ref: t
  }));
});
yp.propTypes = {
  orientation(e, t, n) {
    const o = e[t], r = String(o);
    return o && !Cp(o) ? new Error(i6(r, n)) : null;
  }
};
function i6(e, t) {
  return `Invalid prop \`orientation\` of value \`${e}\` supplied to \`${t}\`, expected one of:
  - horizontal
  - vertical

Defaulting to \`${Ya}\`.`;
}
function Cp(e) {
  return s6.includes(e);
}
const Sp = yp, l6 = w.forwardRef(({ className: e, orientation: t = "horizontal", decorative: n = !0, ...o }, r) => /* @__PURE__ */ P(
  Sp,
  {
    ref: r,
    decorative: n,
    orientation: t,
    className: M(
      "shrink-0 bg-border",
      t === "horizontal" ? "h-[1px] w-full" : "h-full w-[1px]",
      e
    ),
    ...o
  }
));
l6.displayName = Sp.displayName;
const VE = wr, HE = yr, BE = Jt, d6 = Cr, Ep = w.forwardRef(({ className: e, ...t }, n) => /* @__PURE__ */ P(
  Cn,
  {
    className: M(
      "fixed inset-0 z-50 bg-background/80 backdrop-blur-sm data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0",
      e
    ),
    ...t,
    ref: n
  }
));
Ep.displayName = Cn.displayName;
const u6 = kt(
  "fixed z-50 gap-4 bg-background p-6 shadow-lg transition ease-in-out data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:duration-300 data-[state=open]:duration-500",
  {
    variants: {
      side: {
        top: "inset-x-0 top-0 border-b data-[state=closed]:slide-out-to-top data-[state=open]:slide-in-from-top",
        bottom: "inset-x-0 bottom-0 border-t data-[state=closed]:slide-out-to-bottom data-[state=open]:slide-in-from-bottom",
        left: "inset-y-0 left-0 h-full w-3/4 border-r data-[state=closed]:slide-out-to-left data-[state=open]:slide-in-from-left sm:max-w-sm",
        right: "inset-y-0 right-0 h-full w-3/4  border-l data-[state=closed]:slide-out-to-right data-[state=open]:slide-in-from-right sm:max-w-sm"
      }
    },
    defaultVariants: {
      side: "right"
    }
  }
), f6 = w.forwardRef(({ side: e = "right", className: t, children: n, ...o }, r) => /* @__PURE__ */ ve(d6, { children: [
  /* @__PURE__ */ P(Ep, {}),
  /* @__PURE__ */ ve(Sn, { ref: r, className: M(u6({ side: e }), t), ...o, children: [
    n,
    /* @__PURE__ */ ve(
      Jt,
      {
        className: "absolute right-4 top-4 rounded-sm opacity-70 ring-offset-background transition-opacity hover:opacity-100 focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:pointer-events-none data-[state=open]:bg-secondary",
        children: [
          /* @__PURE__ */ P(lc, { className: "h-4 w-4" }),
          /* @__PURE__ */ P("span", { className: "sr-only", children: "Close" })
        ]
      }
    )
  ] })
] }));
f6.displayName = Sn.displayName;
function p6({
  className: e,
  ...t
}) {
  return /* @__PURE__ */ P(
    "div",
    {
      className: M("flex flex-col space-y-2 text-center sm:text-left", e),
      ...t
    }
  );
}
p6.displayName = "SheetHeader";
function m6({
  className: e,
  ...t
}) {
  return /* @__PURE__ */ P(
    "div",
    {
      className: M("flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2", e),
      ...t
    }
  );
}
m6.displayName = "SheetFooter";
const b6 = w.forwardRef(({ className: e, ...t }, n) => /* @__PURE__ */ P(
  En,
  {
    ref: n,
    className: M("text-lg font-semibold text-foreground", e),
    ...t
  }
));
b6.displayName = En.displayName;
const v6 = w.forwardRef(({ className: e, ...t }, n) => /* @__PURE__ */ P(
  Pn,
  {
    ref: n,
    className: M("text-sm text-muted-foreground", e),
    ...t
  }
));
v6.displayName = Pn.displayName;
function KE({
  className: e,
  ...t
}) {
  return /* @__PURE__ */ P("div", { className: M("animate-pulse rounded-md bg-muted", e), ...t });
}
const Pp = [
  "PageUp",
  "PageDown"
], _p = [
  "ArrowUp",
  "ArrowDown",
  "ArrowLeft",
  "ArrowRight"
], Tp = {
  "from-left": [
    "Home",
    "PageDown",
    "ArrowDown",
    "ArrowLeft"
  ],
  "from-right": [
    "Home",
    "PageDown",
    "ArrowDown",
    "ArrowRight"
  ],
  "from-bottom": [
    "Home",
    "PageDown",
    "ArrowDown",
    "ArrowLeft"
  ],
  "from-top": [
    "Home",
    "PageDown",
    "ArrowUp",
    "ArrowLeft"
  ]
}, No = "Slider", [Xa, g6, h6] = wt(No), [Np, GE] = we(No, [
  h6
]), [$6, Br] = Np(No), x6 = /* @__PURE__ */ _((e, t) => {
  const { name: n, min: o = 0, max: r = 100, step: a = 1, orientation: c = "horizontal", disabled: s = !1, minStepsBetweenThumbs: i = 0, defaultValue: l = [
    o
  ], value: u, onValueChange: d = () => {
  }, onValueCommit: f = () => {
  }, inverted: m = !1, ...b } = e, [p, g] = q(null), h = ae(
    t,
    (D) => g(D)
  ), $ = A(/* @__PURE__ */ new Set()), x = A(0), C = c === "horizontal", y = p ? !!p.closest("form") : !0, E = C ? w6 : y6, [T = [], R] = Se({
    prop: u,
    defaultProp: l,
    onChange: (D) => {
      var V;
      (V = [
        ...$.current
      ][x.current]) === null || V === void 0 || V.focus(), d(D);
    }
  }), N = A(T);
  function H(D) {
    const V = A6(T, D);
    Q(D, V);
  }
  function K(D) {
    Q(D, x.current);
  }
  function I() {
    const D = N.current[x.current];
    T[x.current] !== D && f(T);
  }
  function Q(D, V, { commit: J } = {
    commit: !1
  }) {
    const oe = O6(a), se = k6(Math.round((D - o) / a) * a + o, oe), Y = lo(se, [
      o,
      r
    ]);
    R((k = []) => {
      const W = N6(k, Y, V);
      if (I6(W, i * a)) {
        x.current = W.indexOf(Y);
        const L = String(W) !== String(k);
        return L && J && f(W), L ? W : k;
      } else
        return k;
    });
  }
  return /* @__PURE__ */ v($6, {
    scope: e.__scopeSlider,
    disabled: s,
    min: o,
    max: r,
    valueIndexToChangeRef: x,
    thumbs: $.current,
    values: T,
    orientation: c
  }, /* @__PURE__ */ v(Xa.Provider, {
    scope: e.__scopeSlider
  }, /* @__PURE__ */ v(Xa.Slot, {
    scope: e.__scopeSlider
  }, /* @__PURE__ */ v(E, S({
    "aria-disabled": s,
    "data-disabled": s ? "" : void 0
  }, b, {
    ref: h,
    onPointerDown: O(b.onPointerDown, () => {
      s || (N.current = T);
    }),
    min: o,
    max: r,
    inverted: m,
    onSlideStart: s ? void 0 : H,
    onSlideMove: s ? void 0 : K,
    onSlideEnd: s ? void 0 : I,
    onHomeKeyDown: () => !s && Q(o, 0, {
      commit: !0
    }),
    onEndKeyDown: () => !s && Q(r, T.length - 1, {
      commit: !0
    }),
    onStepKeyDown: ({ event: D, direction: V }) => {
      if (!s) {
        const se = Pp.includes(D.key) || D.shiftKey && _p.includes(D.key) ? 10 : 1, Y = x.current, k = T[Y], W = a * se * V;
        Q(k + W, Y, {
          commit: !0
        });
      }
    }
  })))), y && T.map(
    (D, V) => /* @__PURE__ */ v(T6, {
      key: V,
      name: n ? n + (T.length > 1 ? "[]" : "") : void 0,
      value: D
    })
  ));
}), [Rp, Ap] = Np(No, {
  startEdge: "left",
  endEdge: "right",
  size: "width",
  direction: 1
}), w6 = /* @__PURE__ */ _((e, t) => {
  const { min: n, max: o, dir: r, inverted: a, onSlideStart: c, onSlideMove: s, onSlideEnd: i, onStepKeyDown: l, ...u } = e, [d, f] = q(null), m = ae(
    t,
    (x) => f(x)
  ), b = A(), p = rt(r), g = p === "ltr", h = g && !a || !g && a;
  function $(x) {
    const C = b.current || d.getBoundingClientRect(), y = [
      0,
      C.width
    ], T = fs(y, h ? [
      n,
      o
    ] : [
      o,
      n
    ]);
    return b.current = C, T(x - C.left);
  }
  return /* @__PURE__ */ v(Rp, {
    scope: e.__scopeSlider,
    startEdge: h ? "left" : "right",
    endEdge: h ? "right" : "left",
    direction: h ? 1 : -1,
    size: "width"
  }, /* @__PURE__ */ v(Mp, S({
    dir: p,
    "data-orientation": "horizontal"
  }, u, {
    ref: m,
    style: {
      ...u.style,
      "--radix-slider-thumb-transform": "translateX(-50%)"
    },
    onSlideStart: (x) => {
      const C = $(x.clientX);
      c == null || c(C);
    },
    onSlideMove: (x) => {
      const C = $(x.clientX);
      s == null || s(C);
    },
    onSlideEnd: () => {
      b.current = void 0, i == null || i();
    },
    onStepKeyDown: (x) => {
      const y = Tp[h ? "from-left" : "from-right"].includes(x.key);
      l == null || l({
        event: x,
        direction: y ? -1 : 1
      });
    }
  })));
}), y6 = /* @__PURE__ */ _((e, t) => {
  const { min: n, max: o, inverted: r, onSlideStart: a, onSlideMove: c, onSlideEnd: s, onStepKeyDown: i, ...l } = e, u = A(null), d = ae(t, u), f = A(), m = !r;
  function b(p) {
    const g = f.current || u.current.getBoundingClientRect(), h = [
      0,
      g.height
    ], x = fs(h, m ? [
      o,
      n
    ] : [
      n,
      o
    ]);
    return f.current = g, x(p - g.top);
  }
  return /* @__PURE__ */ v(Rp, {
    scope: e.__scopeSlider,
    startEdge: m ? "bottom" : "top",
    endEdge: m ? "top" : "bottom",
    size: "height",
    direction: m ? 1 : -1
  }, /* @__PURE__ */ v(Mp, S({
    "data-orientation": "vertical"
  }, l, {
    ref: d,
    style: {
      ...l.style,
      "--radix-slider-thumb-transform": "translateY(50%)"
    },
    onSlideStart: (p) => {
      const g = b(p.clientY);
      a == null || a(g);
    },
    onSlideMove: (p) => {
      const g = b(p.clientY);
      c == null || c(g);
    },
    onSlideEnd: () => {
      f.current = void 0, s == null || s();
    },
    onStepKeyDown: (p) => {
      const h = Tp[m ? "from-bottom" : "from-top"].includes(p.key);
      i == null || i({
        event: p,
        direction: h ? -1 : 1
      });
    }
  })));
}), Mp = /* @__PURE__ */ _((e, t) => {
  const { __scopeSlider: n, onSlideStart: o, onSlideMove: r, onSlideEnd: a, onHomeKeyDown: c, onEndKeyDown: s, onStepKeyDown: i, ...l } = e, u = Br(No, n);
  return /* @__PURE__ */ v(Z.span, S({}, l, {
    ref: t,
    onKeyDown: O(e.onKeyDown, (d) => {
      d.key === "Home" ? (c(d), d.preventDefault()) : d.key === "End" ? (s(d), d.preventDefault()) : Pp.concat(_p).includes(d.key) && (i(d), d.preventDefault());
    }),
    onPointerDown: O(e.onPointerDown, (d) => {
      const f = d.target;
      f.setPointerCapture(d.pointerId), d.preventDefault(), u.thumbs.has(f) ? f.focus() : o(d);
    }),
    onPointerMove: O(e.onPointerMove, (d) => {
      d.target.hasPointerCapture(d.pointerId) && r(d);
    }),
    onPointerUp: O(e.onPointerUp, (d) => {
      const f = d.target;
      f.hasPointerCapture(d.pointerId) && (f.releasePointerCapture(d.pointerId), a(d));
    })
  }));
}), C6 = "SliderTrack", S6 = /* @__PURE__ */ _((e, t) => {
  const { __scopeSlider: n, ...o } = e, r = Br(C6, n);
  return /* @__PURE__ */ v(Z.span, S({
    "data-disabled": r.disabled ? "" : void 0,
    "data-orientation": r.orientation
  }, o, {
    ref: t
  }));
}), _i = "SliderRange", E6 = /* @__PURE__ */ _((e, t) => {
  const { __scopeSlider: n, ...o } = e, r = Br(_i, n), a = Ap(_i, n), c = A(null), s = ae(t, c), i = r.values.length, l = r.values.map(
    (f) => Dp(f, r.min, r.max)
  ), u = i > 1 ? Math.min(...l) : 0, d = 100 - Math.max(...l);
  return /* @__PURE__ */ v(Z.span, S({
    "data-orientation": r.orientation,
    "data-disabled": r.disabled ? "" : void 0
  }, o, {
    ref: s,
    style: {
      ...e.style,
      [a.startEdge]: u + "%",
      [a.endEdge]: d + "%"
    }
  }));
}), Ti = "SliderThumb", P6 = /* @__PURE__ */ _((e, t) => {
  const n = g6(e.__scopeSlider), [o, r] = q(null), a = ae(
    t,
    (s) => r(s)
  ), c = Fe(
    () => o ? n().findIndex(
      (s) => s.ref.current === o
    ) : -1,
    [
      n,
      o
    ]
  );
  return /* @__PURE__ */ v(_6, S({}, e, {
    ref: a,
    index: c
  }));
}), _6 = /* @__PURE__ */ _((e, t) => {
  const { __scopeSlider: n, index: o, ...r } = e, a = Br(Ti, n), c = Ap(Ti, n), [s, i] = q(null), l = ae(
    t,
    (g) => i(g)
  ), u = go(s), d = a.values[o], f = d === void 0 ? 0 : Dp(d, a.min, a.max), m = R6(o, a.values.length), b = u == null ? void 0 : u[c.size], p = b ? M6(b, f, c.direction) : 0;
  return j(() => {
    if (s)
      return a.thumbs.add(s), () => {
        a.thumbs.delete(s);
      };
  }, [
    s,
    a.thumbs
  ]), /* @__PURE__ */ v("span", {
    style: {
      transform: "var(--radix-slider-thumb-transform)",
      position: "absolute",
      [c.startEdge]: `calc(${f}% + ${p}px)`
    }
  }, /* @__PURE__ */ v(Xa.ItemSlot, {
    scope: e.__scopeSlider
  }, /* @__PURE__ */ v(Z.span, S({
    role: "slider",
    "aria-label": e["aria-label"] || m,
    "aria-valuemin": a.min,
    "aria-valuenow": d,
    "aria-valuemax": a.max,
    "aria-orientation": a.orientation,
    "data-orientation": a.orientation,
    "data-disabled": a.disabled ? "" : void 0,
    tabIndex: a.disabled ? void 0 : 0
  }, r, {
    ref: l,
    style: d === void 0 ? {
      display: "none"
    } : e.style,
    onFocus: O(e.onFocus, () => {
      a.valueIndexToChangeRef.current = o;
    })
  }))));
}), T6 = (e) => {
  const { value: t, ...n } = e, o = A(null), r = _n(t);
  return j(() => {
    const a = o.current, c = window.HTMLInputElement.prototype, i = Object.getOwnPropertyDescriptor(c, "value").set;
    if (r !== t && i) {
      const l = new Event("input", {
        bubbles: !0
      });
      i.call(a, t), a.dispatchEvent(l);
    }
  }, [
    r,
    t
  ]), /* @__PURE__ */ v("input", S({
    style: {
      display: "none"
    }
  }, n, {
    ref: o,
    defaultValue: t
  }));
};
function N6(e = [], t, n) {
  const o = [
    ...e
  ];
  return o[n] = t, o.sort(
    (r, a) => r - a
  );
}
function Dp(e, t, n) {
  const a = 100 / (n - t) * (e - t);
  return lo(a, [
    0,
    100
  ]);
}
function R6(e, t) {
  return t > 2 ? `Value ${e + 1} of ${t}` : t === 2 ? [
    "Minimum",
    "Maximum"
  ][e] : void 0;
}
function A6(e, t) {
  if (e.length === 1)
    return 0;
  const n = e.map(
    (r) => Math.abs(r - t)
  ), o = Math.min(...n);
  return n.indexOf(o);
}
function M6(e, t, n) {
  const o = e / 2, a = fs([
    0,
    50
  ], [
    0,
    o
  ]);
  return (o - a(t) * n) * n;
}
function D6(e) {
  return e.slice(0, -1).map(
    (t, n) => e[n + 1] - t
  );
}
function I6(e, t) {
  if (t > 0) {
    const n = D6(e);
    return Math.min(...n) >= t;
  }
  return !0;
}
function fs(e, t) {
  return (n) => {
    if (e[0] === e[1] || t[0] === t[1])
      return t[0];
    const o = (t[1] - t[0]) / (e[1] - e[0]);
    return t[0] + o * (n - e[0]);
  };
}
function O6(e) {
  return (String(e).split(".")[1] || "").length;
}
function k6(e, t) {
  const n = Math.pow(10, t);
  return Math.round(e * n) / n;
}
const Ip = x6, L6 = S6, F6 = E6, z6 = P6, V6 = w.forwardRef(({ className: e, ...t }, n) => /* @__PURE__ */ ve(
  Ip,
  {
    ref: n,
    className: M("relative flex w-full touch-none select-none items-center", e),
    ...t,
    children: [
      /* @__PURE__ */ P(
        L6,
        {
          className: "relative h-2 w-full grow overflow-hidden rounded-full bg-secondary",
          children: /* @__PURE__ */ P(F6, { className: "absolute h-full bg-primary" })
        }
      ),
      /* @__PURE__ */ P(
        z6,
        {
          className: "block h-5 w-5 rounded-full border-2 border-primary bg-background ring-offset-background transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50"
        }
      )
    ]
  }
));
V6.displayName = Ip.displayName;
const Op = "Switch", [H6, UE] = we(Op), [B6, K6] = H6(Op), G6 = /* @__PURE__ */ _((e, t) => {
  const { __scopeSwitch: n, name: o, checked: r, defaultChecked: a, required: c, disabled: s, value: i = "on", onCheckedChange: l, ...u } = e, [d, f] = q(null), m = ae(
    t,
    ($) => f($)
  ), b = A(!1), p = d ? !!d.closest("form") : !0, [g = !1, h] = Se({
    prop: r,
    defaultProp: a,
    onChange: l
  });
  return /* @__PURE__ */ v(B6, {
    scope: n,
    checked: g,
    disabled: s
  }, /* @__PURE__ */ v(Z.button, S({
    type: "button",
    role: "switch",
    "aria-checked": g,
    "aria-required": c,
    "data-state": kp(g),
    "data-disabled": s ? "" : void 0,
    disabled: s,
    value: i
  }, u, {
    ref: m,
    onClick: O(e.onClick, ($) => {
      h(
        (x) => !x
      ), p && (b.current = $.isPropagationStopped(), b.current || $.stopPropagation());
    })
  })), p && /* @__PURE__ */ v(j6, {
    control: d,
    bubbles: !b.current,
    name: o,
    value: i,
    checked: g,
    required: c,
    disabled: s,
    style: {
      transform: "translateX(-100%)"
    }
  }));
}), U6 = "SwitchThumb", W6 = /* @__PURE__ */ _((e, t) => {
  const { __scopeSwitch: n, ...o } = e, r = K6(U6, n);
  return /* @__PURE__ */ v(Z.span, S({
    "data-state": kp(r.checked),
    "data-disabled": r.disabled ? "" : void 0
  }, o, {
    ref: t
  }));
}), j6 = (e) => {
  const { control: t, checked: n, bubbles: o = !0, ...r } = e, a = A(null), c = _n(n), s = go(t);
  return j(() => {
    const i = a.current, l = window.HTMLInputElement.prototype, d = Object.getOwnPropertyDescriptor(l, "checked").set;
    if (c !== n && d) {
      const f = new Event("click", {
        bubbles: o
      });
      d.call(i, n), i.dispatchEvent(f);
    }
  }, [
    c,
    n,
    o
  ]), /* @__PURE__ */ v("input", S({
    type: "checkbox",
    "aria-hidden": !0,
    defaultChecked: n
  }, r, {
    tabIndex: -1,
    ref: a,
    style: {
      ...e.style,
      ...s,
      position: "absolute",
      pointerEvents: "none",
      opacity: 0,
      margin: 0
    }
  }));
};
function kp(e) {
  return e ? "checked" : "unchecked";
}
const Lp = G6, Y6 = W6, X6 = w.forwardRef(({ className: e, ...t }, n) => /* @__PURE__ */ P(
  Lp,
  {
    className: M(
      "peer inline-flex h-6 w-11 shrink-0 cursor-pointer items-center rounded-full border-2 border-transparent transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 focus-visible:ring-offset-background disabled:cursor-not-allowed disabled:opacity-50 data-[state=checked]:bg-primary data-[state=unchecked]:bg-input",
      e
    ),
    ...t,
    ref: n,
    children: /* @__PURE__ */ P(
      Y6,
      {
        className: M(
          "pointer-events-none block h-5 w-5 rounded-full bg-background shadow-lg ring-0 transition-transform data-[state=checked]:translate-x-5 data-[state=unchecked]:translate-x-0"
        )
      }
    )
  }
));
X6.displayName = Lp.displayName;
const q6 = w.forwardRef(({ className: e, ...t }, n) => /* @__PURE__ */ P("div", { className: "relative w-full overflow-auto", children: /* @__PURE__ */ P(
  "table",
  {
    ref: n,
    className: M("w-full caption-bottom text-sm", e),
    ...t
  }
) }));
q6.displayName = "Table";
const Z6 = w.forwardRef(({ className: e, ...t }, n) => /* @__PURE__ */ P("thead", { ref: n, className: M("[&_tr]:border-b", e), ...t }));
Z6.displayName = "TableHeader";
const Q6 = w.forwardRef(({ className: e, ...t }, n) => /* @__PURE__ */ P(
  "tbody",
  {
    ref: n,
    className: M("[&_tr:last-child]:border-0", e),
    ...t
  }
));
Q6.displayName = "TableBody";
const J6 = w.forwardRef(({ className: e, ...t }, n) => /* @__PURE__ */ P(
  "tfoot",
  {
    ref: n,
    className: M("border-t bg-muted/50 font-medium [&>tr]:last:border-b-0", e),
    ...t
  }
));
J6.displayName = "TableFooter";
const eS = w.forwardRef(({ className: e, ...t }, n) => /* @__PURE__ */ P(
  "tr",
  {
    ref: n,
    className: M(
      "border-b transition-colors hover:bg-muted/50 data-[state=selected]:bg-muted",
      e
    ),
    ...t
  }
));
eS.displayName = "TableRow";
const tS = w.forwardRef(({ className: e, ...t }, n) => /* @__PURE__ */ P(
  "th",
  {
    ref: n,
    className: M(
      "h-12 px-4 text-left align-middle font-medium text-muted-foreground [&:has([role=checkbox])]:pr-0",
      e
    ),
    ...t
  }
));
tS.displayName = "TableHead";
const nS = w.forwardRef(({ className: e, ...t }, n) => /* @__PURE__ */ P(
  "td",
  {
    ref: n,
    className: M("p-4 align-middle [&:has([role=checkbox])]:pr-0", e),
    ...t
  }
));
nS.displayName = "TableCell";
const oS = w.forwardRef(({ className: e, ...t }, n) => /* @__PURE__ */ P(
  "caption",
  {
    ref: n,
    className: M("mt-4 text-sm text-muted-foreground", e),
    ...t
  }
));
oS.displayName = "TableCaption";
const Fp = "Tabs", [rS, WE] = we(Fp, [
  dt
]), zp = dt(), [aS, ps] = rS(Fp), cS = /* @__PURE__ */ _((e, t) => {
  const { __scopeTabs: n, value: o, onValueChange: r, defaultValue: a, orientation: c = "horizontal", dir: s, activationMode: i = "automatic", ...l } = e, u = rt(s), [d, f] = Se({
    prop: o,
    onChange: r,
    defaultProp: a
  });
  return /* @__PURE__ */ v(aS, {
    scope: n,
    baseId: Me(),
    value: d,
    onValueChange: f,
    orientation: c,
    dir: u,
    activationMode: i
  }, /* @__PURE__ */ v(Z.div, S({
    dir: u,
    "data-orientation": c
  }, l, {
    ref: t
  })));
}), sS = "TabsList", iS = /* @__PURE__ */ _((e, t) => {
  const { __scopeTabs: n, loop: o = !0, ...r } = e, a = ps(sS, n), c = zp(n);
  return /* @__PURE__ */ v(So, S({
    asChild: !0
  }, c, {
    orientation: a.orientation,
    dir: a.dir,
    loop: o
  }), /* @__PURE__ */ v(Z.div, S({
    role: "tablist",
    "aria-orientation": a.orientation
  }, r, {
    ref: t
  })));
}), lS = "TabsTrigger", dS = /* @__PURE__ */ _((e, t) => {
  const { __scopeTabs: n, value: o, disabled: r = !1, ...a } = e, c = ps(lS, n), s = zp(n), i = Vp(c.baseId, o), l = Hp(c.baseId, o), u = o === c.value;
  return /* @__PURE__ */ v(Eo, S({
    asChild: !0
  }, s, {
    focusable: !r,
    active: u
  }), /* @__PURE__ */ v(Z.button, S({
    type: "button",
    role: "tab",
    "aria-selected": u,
    "aria-controls": l,
    "data-state": u ? "active" : "inactive",
    "data-disabled": r ? "" : void 0,
    disabled: r,
    id: i
  }, a, {
    ref: t,
    onMouseDown: O(e.onMouseDown, (d) => {
      !r && d.button === 0 && d.ctrlKey === !1 ? c.onValueChange(o) : d.preventDefault();
    }),
    onKeyDown: O(e.onKeyDown, (d) => {
      [
        " ",
        "Enter"
      ].includes(d.key) && c.onValueChange(o);
    }),
    onFocus: O(e.onFocus, () => {
      const d = c.activationMode !== "manual";
      !u && !r && d && c.onValueChange(o);
    })
  })));
}), uS = "TabsContent", fS = /* @__PURE__ */ _((e, t) => {
  const { __scopeTabs: n, value: o, forceMount: r, children: a, ...c } = e, s = ps(uS, n), i = Vp(s.baseId, o), l = Hp(s.baseId, o), u = o === s.value, d = A(u);
  return j(() => {
    const f = requestAnimationFrame(
      () => d.current = !1
    );
    return () => cancelAnimationFrame(f);
  }, []), /* @__PURE__ */ v(
    Ee,
    {
      present: r || u
    },
    ({ present: f }) => /* @__PURE__ */ v(Z.div, S({
      "data-state": u ? "active" : "inactive",
      "data-orientation": s.orientation,
      role: "tabpanel",
      "aria-labelledby": i,
      hidden: !f,
      id: l,
      tabIndex: 0
    }, c, {
      ref: t,
      style: {
        ...e.style,
        animationDuration: d.current ? "0s" : void 0
      }
    }), f && a)
  );
});
function Vp(e, t) {
  return `${e}-trigger-${t}`;
}
function Hp(e, t) {
  return `${e}-content-${t}`;
}
const pS = cS, Bp = iS, Kp = dS, Gp = fS, jE = pS, mS = w.forwardRef(({ className: e, ...t }, n) => /* @__PURE__ */ P(
  Bp,
  {
    ref: n,
    className: M(
      "inline-flex h-10 items-center justify-center rounded-md bg-muted p-1 text-muted-foreground",
      e
    ),
    ...t
  }
));
mS.displayName = Bp.displayName;
const bS = w.forwardRef(({ className: e, ...t }, n) => /* @__PURE__ */ P(
  Kp,
  {
    ref: n,
    className: M(
      "inline-flex items-center justify-center whitespace-nowrap rounded-sm px-3 py-1.5 text-sm font-medium ring-offset-background transition-all focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 data-[state=active]:bg-background data-[state=active]:text-foreground data-[state=active]:shadow-sm",
      e
    ),
    ...t
  }
));
bS.displayName = Kp.displayName;
const vS = w.forwardRef(({ className: e, ...t }, n) => /* @__PURE__ */ P(
  Gp,
  {
    ref: n,
    className: M(
      "mt-2 ring-offset-background focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2",
      e
    ),
    ...t
  }
));
vS.displayName = Gp.displayName;
const gS = w.forwardRef(({ className: e, ...t }, n) => /* @__PURE__ */ P(
  "textarea",
  {
    className: M(
      "flex min-h-[80px] w-full rounded-md border border-input bg-background px-3 py-2 text-sm ring-offset-background placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50",
      e
    ),
    ref: n,
    ...t
  }
));
gS.displayName = "Textarea";
const Up = "ToastProvider", [ms, hS, $S] = wt("Toast"), [Wp, YE] = we("Toast", [
  $S
]), [xS, Kr] = Wp(Up), jp = (e) => {
  const { __scopeToast: t, label: n = "Notification", duration: o = 5e3, swipeDirection: r = "right", swipeThreshold: a = 50, children: c } = e, [s, i] = q(null), [l, u] = q(0), d = A(!1), f = A(!1);
  return /* @__PURE__ */ v(ms.Provider, {
    scope: t
  }, /* @__PURE__ */ v(xS, {
    scope: t,
    label: n,
    duration: o,
    swipeDirection: r,
    swipeThreshold: a,
    toastCount: l,
    viewport: s,
    onViewportChange: i,
    onToastAdd: re(
      () => u(
        (m) => m + 1
      ),
      []
    ),
    onToastRemove: re(
      () => u(
        (m) => m - 1
      ),
      []
    ),
    isFocusedToastEscapeKeyDownRef: d,
    isClosePausedRef: f
  }, c));
};
jp.propTypes = {
  label(e) {
    if (e.label && typeof e.label == "string" && !e.label.trim()) {
      const t = `Invalid prop \`label\` supplied to \`${Up}\`. Expected non-empty \`string\`.`;
      return new Error(t);
    }
    return null;
  }
};
const wS = "ToastViewport", yS = [
  "F8"
], qa = "toast.viewportPause", Za = "toast.viewportResume", CS = /* @__PURE__ */ _((e, t) => {
  const { __scopeToast: n, hotkey: o = yS, label: r = "Notifications ({hotkey})", ...a } = e, c = Kr(wS, n), s = hS(n), i = A(null), l = A(null), u = A(null), d = A(null), f = ae(t, d, c.onViewportChange), m = o.join("+").replace(/Key/g, "").replace(/Digit/g, ""), b = c.toastCount > 0;
  j(() => {
    const g = (h) => {
      var $;
      o.every(
        (C) => h[C] || h.code === C
      ) && (($ = d.current) === null || $ === void 0 || $.focus());
    };
    return document.addEventListener("keydown", g), () => document.removeEventListener("keydown", g);
  }, [
    o
  ]), j(() => {
    const g = i.current, h = d.current;
    if (b && g && h) {
      const $ = () => {
        if (!c.isClosePausedRef.current) {
          const E = new CustomEvent(qa);
          h.dispatchEvent(E), c.isClosePausedRef.current = !0;
        }
      }, x = () => {
        if (c.isClosePausedRef.current) {
          const E = new CustomEvent(Za);
          h.dispatchEvent(E), c.isClosePausedRef.current = !1;
        }
      }, C = (E) => {
        !g.contains(E.relatedTarget) && x();
      }, y = () => {
        g.contains(document.activeElement) || x();
      };
      return g.addEventListener("focusin", $), g.addEventListener("focusout", C), g.addEventListener("pointermove", $), g.addEventListener("pointerleave", y), window.addEventListener("blur", $), window.addEventListener("focus", x), () => {
        g.removeEventListener("focusin", $), g.removeEventListener("focusout", C), g.removeEventListener("pointermove", $), g.removeEventListener("pointerleave", y), window.removeEventListener("blur", $), window.removeEventListener("focus", x);
      };
    }
  }, [
    b,
    c.isClosePausedRef
  ]);
  const p = re(({ tabbingDirection: g }) => {
    const $ = s().map((x) => {
      const C = x.ref.current, y = [
        C,
        ...zS(C)
      ];
      return g === "forwards" ? y : y.reverse();
    });
    return (g === "forwards" ? $.reverse() : $).flat();
  }, [
    s
  ]);
  return j(() => {
    const g = d.current;
    if (g) {
      const h = ($) => {
        const x = $.altKey || $.ctrlKey || $.metaKey;
        if ($.key === "Tab" && !x) {
          const R = document.activeElement, N = $.shiftKey;
          if ($.target === g && N) {
            var y;
            (y = l.current) === null || y === void 0 || y.focus();
            return;
          }
          const I = p({
            tabbingDirection: N ? "backwards" : "forwards"
          }), Q = I.findIndex(
            (D) => D === R
          );
          if (va(I.slice(Q + 1)))
            $.preventDefault();
          else {
            var E, T;
            N ? (E = l.current) === null || E === void 0 || E.focus() : (T = u.current) === null || T === void 0 || T.focus();
          }
        }
      };
      return g.addEventListener("keydown", h), () => g.removeEventListener("keydown", h);
    }
  }, [
    s,
    p
  ]), /* @__PURE__ */ v(av, {
    ref: i,
    role: "region",
    "aria-label": r.replace("{hotkey}", m),
    tabIndex: -1,
    style: {
      pointerEvents: b ? void 0 : "none"
    }
  }, b && /* @__PURE__ */ v(Ni, {
    ref: l,
    onFocusFromOutsideViewport: () => {
      const g = p({
        tabbingDirection: "forwards"
      });
      va(g);
    }
  }), /* @__PURE__ */ v(ms.Slot, {
    scope: n
  }, /* @__PURE__ */ v(Z.ol, S({
    tabIndex: -1
  }, a, {
    ref: f
  }))), b && /* @__PURE__ */ v(Ni, {
    ref: u,
    onFocusFromOutsideViewport: () => {
      const g = p({
        tabbingDirection: "backwards"
      });
      va(g);
    }
  }));
}), SS = "ToastFocusProxy", Ni = /* @__PURE__ */ _((e, t) => {
  const { __scopeToast: n, onFocusFromOutsideViewport: o, ...r } = e, a = Kr(SS, n);
  return /* @__PURE__ */ v(Dr, S({
    "aria-hidden": !0,
    tabIndex: 0
  }, r, {
    ref: t,
    style: {
      position: "fixed"
    },
    onFocus: (c) => {
      var s;
      const i = c.relatedTarget;
      !((s = a.viewport) !== null && s !== void 0 && s.contains(i)) && o();
    }
  }));
}), Gr = "Toast", ES = "toast.swipeStart", PS = "toast.swipeMove", _S = "toast.swipeCancel", TS = "toast.swipeEnd", NS = /* @__PURE__ */ _((e, t) => {
  const { forceMount: n, open: o, defaultOpen: r, onOpenChange: a, ...c } = e, [s = !0, i] = Se({
    prop: o,
    defaultProp: r,
    onChange: a
  });
  return /* @__PURE__ */ v(Ee, {
    present: n || s
  }, /* @__PURE__ */ v(Yp, S({
    open: s
  }, c, {
    ref: t,
    onClose: () => i(!1),
    onPause: ge(e.onPause),
    onResume: ge(e.onResume),
    onSwipeStart: O(e.onSwipeStart, (l) => {
      l.currentTarget.setAttribute("data-swipe", "start");
    }),
    onSwipeMove: O(e.onSwipeMove, (l) => {
      const { x: u, y: d } = l.detail.delta;
      l.currentTarget.setAttribute("data-swipe", "move"), l.currentTarget.style.setProperty("--radix-toast-swipe-move-x", `${u}px`), l.currentTarget.style.setProperty("--radix-toast-swipe-move-y", `${d}px`);
    }),
    onSwipeCancel: O(e.onSwipeCancel, (l) => {
      l.currentTarget.setAttribute("data-swipe", "cancel"), l.currentTarget.style.removeProperty("--radix-toast-swipe-move-x"), l.currentTarget.style.removeProperty("--radix-toast-swipe-move-y"), l.currentTarget.style.removeProperty("--radix-toast-swipe-end-x"), l.currentTarget.style.removeProperty("--radix-toast-swipe-end-y");
    }),
    onSwipeEnd: O(e.onSwipeEnd, (l) => {
      const { x: u, y: d } = l.detail.delta;
      l.currentTarget.setAttribute("data-swipe", "end"), l.currentTarget.style.removeProperty("--radix-toast-swipe-move-x"), l.currentTarget.style.removeProperty("--radix-toast-swipe-move-y"), l.currentTarget.style.setProperty("--radix-toast-swipe-end-x", `${u}px`), l.currentTarget.style.setProperty("--radix-toast-swipe-end-y", `${d}px`), i(!1);
    })
  })));
}), [RS, AS] = Wp(Gr, {
  onClose() {
  }
}), Yp = /* @__PURE__ */ _((e, t) => {
  const { __scopeToast: n, type: o = "foreground", duration: r, open: a, onClose: c, onEscapeKeyDown: s, onPause: i, onResume: l, onSwipeStart: u, onSwipeMove: d, onSwipeCancel: f, onSwipeEnd: m, ...b } = e, p = Kr(Gr, n), [g, h] = q(null), $ = ae(
    t,
    (D) => h(D)
  ), x = A(null), C = A(null), y = r || p.duration, E = A(0), T = A(y), R = A(0), { onToastAdd: N, onToastRemove: H } = p, K = ge(() => {
    var D;
    (g == null ? void 0 : g.contains(document.activeElement)) && ((D = p.viewport) === null || D === void 0 || D.focus()), c();
  }), I = re((D) => {
    !D || D === 1 / 0 || (window.clearTimeout(R.current), E.current = (/* @__PURE__ */ new Date()).getTime(), R.current = window.setTimeout(K, D));
  }, [
    K
  ]);
  j(() => {
    const D = p.viewport;
    if (D) {
      const V = () => {
        I(T.current), l == null || l();
      }, J = () => {
        const oe = (/* @__PURE__ */ new Date()).getTime() - E.current;
        T.current = T.current - oe, window.clearTimeout(R.current), i == null || i();
      };
      return D.addEventListener(qa, J), D.addEventListener(Za, V), () => {
        D.removeEventListener(qa, J), D.removeEventListener(Za, V);
      };
    }
  }, [
    p.viewport,
    y,
    i,
    l,
    I
  ]), j(() => {
    a && !p.isClosePausedRef.current && I(y);
  }, [
    a,
    y,
    p.isClosePausedRef,
    I
  ]), j(() => (N(), () => H()), [
    N,
    H
  ]);
  const Q = Fe(() => g ? Qp(g) : null, [
    g
  ]);
  return p.viewport ? /* @__PURE__ */ v(Ge, null, Q && /* @__PURE__ */ v(MS, {
    __scopeToast: n,
    role: "status",
    "aria-live": o === "foreground" ? "assertive" : "polite",
    "aria-atomic": !0
  }, Q), /* @__PURE__ */ v(RS, {
    scope: n,
    onClose: K
  }, /* @__PURE__ */ nc(/* @__PURE__ */ v(ms.ItemSlot, {
    scope: n
  }, /* @__PURE__ */ v(rv, {
    asChild: !0,
    onEscapeKeyDown: O(s, () => {
      p.isFocusedToastEscapeKeyDownRef.current || K(), p.isFocusedToastEscapeKeyDownRef.current = !1;
    })
  }, /* @__PURE__ */ v(Z.li, S({
    // Ensure toasts are announced as status list or status when focused
    role: "status",
    "aria-live": "off",
    "aria-atomic": !0,
    tabIndex: 0,
    "data-state": a ? "open" : "closed",
    "data-swipe-direction": p.swipeDirection
  }, b, {
    ref: $,
    style: {
      userSelect: "none",
      touchAction: "none",
      ...e.style
    },
    onKeyDown: O(e.onKeyDown, (D) => {
      D.key === "Escape" && (s == null || s(D.nativeEvent), D.nativeEvent.defaultPrevented || (p.isFocusedToastEscapeKeyDownRef.current = !0, K()));
    }),
    onPointerDown: O(e.onPointerDown, (D) => {
      D.button === 0 && (x.current = {
        x: D.clientX,
        y: D.clientY
      });
    }),
    onPointerMove: O(e.onPointerMove, (D) => {
      if (!x.current)
        return;
      const V = D.clientX - x.current.x, J = D.clientY - x.current.y, oe = !!C.current, se = [
        "left",
        "right"
      ].includes(p.swipeDirection), Y = [
        "left",
        "up"
      ].includes(p.swipeDirection) ? Math.min : Math.max, k = se ? Y(0, V) : 0, W = se ? 0 : Y(0, J), L = D.pointerType === "touch" ? 10 : 2, z = {
        x: k,
        y: W
      }, X = {
        originalEvent: D,
        delta: z
      };
      oe ? (C.current = z, Wo(PS, d, X, {
        discrete: !1
      })) : Ri(z, p.swipeDirection, L) ? (C.current = z, Wo(ES, u, X, {
        discrete: !1
      }), D.target.setPointerCapture(D.pointerId)) : (Math.abs(V) > L || Math.abs(J) > L) && (x.current = null);
    }),
    onPointerUp: O(e.onPointerUp, (D) => {
      const V = C.current, J = D.target;
      if (J.hasPointerCapture(D.pointerId) && J.releasePointerCapture(D.pointerId), C.current = null, x.current = null, V) {
        const oe = D.currentTarget, se = {
          originalEvent: D,
          delta: V
        };
        Ri(V, p.swipeDirection, p.swipeThreshold) ? Wo(TS, m, se, {
          discrete: !0
        }) : Wo(_S, f, se, {
          discrete: !0
        }), oe.addEventListener(
          "click",
          (Y) => Y.preventDefault(),
          {
            once: !0
          }
        );
      }
    })
  })))), p.viewport))) : null;
});
Yp.propTypes = {
  type(e) {
    if (e.type && ![
      "foreground",
      "background"
    ].includes(e.type)) {
      const t = `Invalid prop \`type\` supplied to \`${Gr}\`. Expected \`foreground | background\`.`;
      return new Error(t);
    }
    return null;
  }
};
const MS = (e) => {
  const { __scopeToast: t, children: n, ...o } = e, r = Kr(Gr, t), [a, c] = q(!1), [s, i] = q(!1);
  return LS(
    () => c(!0)
  ), j(() => {
    const l = window.setTimeout(
      () => i(!0),
      1e3
    );
    return () => window.clearTimeout(l);
  }, []), s ? null : /* @__PURE__ */ v(mo, {
    asChild: !0
  }, /* @__PURE__ */ v(Dr, o, a && /* @__PURE__ */ v(Ge, null, r.label, " ", n)));
}, DS = /* @__PURE__ */ _((e, t) => {
  const { __scopeToast: n, ...o } = e;
  return /* @__PURE__ */ v(Z.div, S({}, o, {
    ref: t
  }));
}), IS = /* @__PURE__ */ _((e, t) => {
  const { __scopeToast: n, ...o } = e;
  return /* @__PURE__ */ v(Z.div, S({}, o, {
    ref: t
  }));
}), OS = "ToastAction", Xp = /* @__PURE__ */ _((e, t) => {
  const { altText: n, ...o } = e;
  return n ? /* @__PURE__ */ v(Zp, {
    altText: n,
    asChild: !0
  }, /* @__PURE__ */ v(qp, S({}, o, {
    ref: t
  }))) : null;
});
Xp.propTypes = {
  altText(e) {
    return e.altText ? null : new Error(`Missing prop \`altText\` expected on \`${OS}\``);
  }
};
const kS = "ToastClose", qp = /* @__PURE__ */ _((e, t) => {
  const { __scopeToast: n, ...o } = e, r = AS(kS, n);
  return /* @__PURE__ */ v(Zp, {
    asChild: !0
  }, /* @__PURE__ */ v(Z.button, S({
    type: "button"
  }, o, {
    ref: t,
    onClick: O(e.onClick, r.onClose)
  })));
}), Zp = /* @__PURE__ */ _((e, t) => {
  const { __scopeToast: n, altText: o, ...r } = e;
  return /* @__PURE__ */ v(Z.div, S({
    "data-radix-toast-announce-exclude": "",
    "data-radix-toast-announce-alt": o || void 0
  }, r, {
    ref: t
  }));
});
function Qp(e) {
  const t = [];
  return Array.from(e.childNodes).forEach((o) => {
    if (o.nodeType === o.TEXT_NODE && o.textContent && t.push(o.textContent), FS(o)) {
      const r = o.ariaHidden || o.hidden || o.style.display === "none", a = o.dataset.radixToastAnnounceExclude === "";
      if (!r)
        if (a) {
          const c = o.dataset.radixToastAnnounceAlt;
          c && t.push(c);
        } else
          t.push(...Qp(o));
    }
  }), t;
}
function Wo(e, t, n, { discrete: o }) {
  const r = n.originalEvent.currentTarget, a = new CustomEvent(e, {
    bubbles: !0,
    cancelable: !0,
    detail: n
  });
  t && r.addEventListener(e, t, {
    once: !0
  }), o ? Xn(r, a) : r.dispatchEvent(a);
}
const Ri = (e, t, n = 0) => {
  const o = Math.abs(e.x), r = Math.abs(e.y), a = o > r;
  return t === "left" || t === "right" ? a && o > n : !a && r > n;
};
function LS(e = () => {
}) {
  const t = ge(e);
  Re(() => {
    let n = 0, o = 0;
    return n = window.requestAnimationFrame(
      () => o = window.requestAnimationFrame(t)
    ), () => {
      window.cancelAnimationFrame(n), window.cancelAnimationFrame(o);
    };
  }, [
    t
  ]);
}
function FS(e) {
  return e.nodeType === e.ELEMENT_NODE;
}
function zS(e) {
  const t = [], n = document.createTreeWalker(e, NodeFilter.SHOW_ELEMENT, {
    acceptNode: (o) => {
      const r = o.tagName === "INPUT" && o.type === "hidden";
      return o.disabled || o.hidden || r ? NodeFilter.FILTER_SKIP : o.tabIndex >= 0 ? NodeFilter.FILTER_ACCEPT : NodeFilter.FILTER_SKIP;
    }
  });
  for (; n.nextNode(); )
    t.push(n.currentNode);
  return t;
}
function va(e) {
  const t = document.activeElement;
  return e.some((n) => n === t ? !0 : (n.focus(), document.activeElement !== t));
}
const VS = jp, Jp = CS, em = NS, tm = DS, nm = IS, om = Xp, rm = qp, HS = VS, am = w.forwardRef(({ className: e, ...t }, n) => /* @__PURE__ */ P(
  Jp,
  {
    ref: n,
    className: M(
      "fixed top-0 z-[100] flex max-h-screen w-full flex-col-reverse p-4 sm:bottom-0 sm:right-0 sm:top-auto sm:flex-col md:max-w-[420px]",
      e
    ),
    ...t
  }
));
am.displayName = Jp.displayName;
const BS = kt(
  "group pointer-events-auto relative flex w-full items-center justify-between space-x-4 overflow-hidden rounded-md border p-6 pr-8 shadow-lg transition-all data-[swipe=cancel]:translate-x-0 data-[swipe=end]:translate-x-[var(--radix-toast-swipe-end-x)] data-[swipe=move]:translate-x-[var(--radix-toast-swipe-move-x)] data-[swipe=move]:transition-none data-[state=open]:animate-in data-[state=closed]:animate-out data-[swipe=end]:animate-out data-[state=closed]:fade-out-80 data-[state=closed]:slide-out-to-right-full data-[state=open]:slide-in-from-top-full data-[state=open]:sm:slide-in-from-bottom-full",
  {
    variants: {
      variant: {
        default: "border bg-background text-foreground",
        destructive: "destructive group border-destructive bg-destructive text-destructive-foreground"
      }
    },
    defaultVariants: {
      variant: "default"
    }
  }
), cm = w.forwardRef(({ className: e, variant: t, ...n }, o) => /* @__PURE__ */ P(
  em,
  {
    ref: o,
    className: M(BS({ variant: t }), e),
    ...n
  }
));
cm.displayName = em.displayName;
const KS = w.forwardRef(({ className: e, ...t }, n) => /* @__PURE__ */ P(
  om,
  {
    ref: n,
    className: M(
      "inline-flex h-8 shrink-0 items-center justify-center rounded-md border bg-transparent px-3 text-sm font-medium ring-offset-background transition-colors hover:bg-secondary focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 group-[.destructive]:border-muted/40 group-[.destructive]:hover:border-destructive/30 group-[.destructive]:hover:bg-destructive group-[.destructive]:hover:text-destructive-foreground group-[.destructive]:focus:ring-destructive",
      e
    ),
    ...t
  }
));
KS.displayName = om.displayName;
const sm = w.forwardRef(({ className: e, ...t }, n) => /* @__PURE__ */ P(
  rm,
  {
    ref: n,
    className: M(
      "absolute right-2 top-2 rounded-md p-1 text-foreground/50 opacity-0 transition-opacity hover:text-foreground focus:opacity-100 focus:outline-none focus:ring-2 group-hover:opacity-100 group-[.destructive]:text-red-300 group-[.destructive]:hover:text-red-50 group-[.destructive]:focus:ring-red-400 group-[.destructive]:focus:ring-offset-red-600",
      e
    ),
    "toast-close": "",
    ...t,
    children: /* @__PURE__ */ P(lc, { className: "h-4 w-4" })
  }
));
sm.displayName = rm.displayName;
const im = w.forwardRef(({ className: e, ...t }, n) => /* @__PURE__ */ P(tm, { ref: n, className: M("text-sm font-semibold", e), ...t }));
im.displayName = tm.displayName;
const lm = w.forwardRef(({ className: e, ...t }, n) => /* @__PURE__ */ P(nm, { ref: n, className: M("text-sm opacity-90", e), ...t }));
lm.displayName = nm.displayName;
const GS = 1, US = 1e6;
let ga = 0;
function WS() {
  return ga = (ga + 1) % Number.MAX_SAFE_INTEGER, ga.toString();
}
const ha = /* @__PURE__ */ new Map();
function Ai(e) {
  if (ha.has(e))
    return;
  const t = setTimeout(() => {
    ha.delete(e), Yn({
      type: "REMOVE_TOAST",
      toastId: e
    });
  }, US);
  ha.set(e, t);
}
function jS(e, t) {
  switch (t.type) {
    case "ADD_TOAST":
      return {
        ...e,
        toasts: [t.toast, ...e.toasts].slice(0, GS)
      };
    case "UPDATE_TOAST":
      return {
        ...e,
        toasts: e.toasts.map((n) => n.id === t.toast.id ? { ...n, ...t.toast } : n)
      };
    case "DISMISS_TOAST": {
      const { toastId: n } = t;
      return n ? Ai(n) : e.toasts.forEach((o) => {
        Ai(o.id);
      }), {
        ...e,
        toasts: e.toasts.map((o) => o.id === n || n === void 0 ? {
          ...o,
          open: !1
        } : o)
      };
    }
    case "REMOVE_TOAST":
      return t.toastId === void 0 ? {
        ...e,
        toasts: []
      } : {
        ...e,
        toasts: e.toasts.filter((n) => n.id !== t.toastId)
      };
  }
}
const qo = [];
let Zo = { toasts: [] };
function Yn(e) {
  Zo = jS(Zo, e), qo.forEach((t) => {
    t(Zo);
  });
}
function YS({
  ...e
}) {
  const t = WS(), n = (r) => Yn({
    type: "UPDATE_TOAST",
    toast: { ...r, id: t }
  }), o = () => Yn({ type: "DISMISS_TOAST", toastId: t });
  return Yn({
    type: "ADD_TOAST",
    toast: {
      ...e,
      id: t,
      open: !0,
      onOpenChange: (r) => {
        r || o();
      }
    }
  }), {
    id: t,
    dismiss: o,
    update: n
  };
}
function XS() {
  const [e, t] = w.useState(Zo);
  return w.useEffect(() => (qo.push(t), () => {
    const n = qo.indexOf(t);
    n > -1 && qo.splice(n, 1);
  }), [e]), {
    ...e,
    toast: YS,
    dismiss: (n) => Yn({ type: "DISMISS_TOAST", toastId: n })
  };
}
function XE() {
  const { toasts: e } = XS();
  return /* @__PURE__ */ ve(HS, { children: [
    e.map(({ id: t, title: n, description: o, action: r, ...a }) => /* @__PURE__ */ ve(cm, { ...a, children: [
      /* @__PURE__ */ ve("div", { className: "grid gap-1", children: [
        n && /* @__PURE__ */ P(im, { children: n }),
        o && /* @__PURE__ */ P(lm, { children: o })
      ] }),
      r,
      /* @__PURE__ */ P(sm, {})
    ] }, t)),
    /* @__PURE__ */ P(am, {})
  ] });
}
const dm = /* @__PURE__ */ _((e, t) => {
  const { pressed: n, defaultPressed: o = !1, onPressedChange: r, ...a } = e, [c = !1, s] = Se({
    prop: n,
    onChange: r,
    defaultProp: o
  });
  return /* @__PURE__ */ v(Z.button, S({
    type: "button",
    "aria-pressed": c,
    "data-state": c ? "on" : "off",
    "data-disabled": e.disabled ? "" : void 0
  }, a, {
    ref: t,
    onClick: O(e.onClick, () => {
      e.disabled || s(!c);
    })
  }));
}), um = dm, Ur = "ToggleGroup", [fm, qE] = we(Ur, [
  dt
]), pm = dt(), qS = /* @__PURE__ */ F.forwardRef((e, t) => {
  const { type: n, ...o } = e;
  if (n === "single") {
    const r = o;
    return /* @__PURE__ */ F.createElement(ZS, S({}, r, {
      ref: t
    }));
  }
  if (n === "multiple") {
    const r = o;
    return /* @__PURE__ */ F.createElement(QS, S({}, r, {
      ref: t
    }));
  }
  throw new Error(`Missing prop \`type\` expected on \`${Ur}\``);
}), [mm, bm] = fm(Ur), ZS = /* @__PURE__ */ F.forwardRef((e, t) => {
  const { value: n, defaultValue: o, onValueChange: r = () => {
  }, ...a } = e, [c, s] = Se({
    prop: n,
    defaultProp: o,
    onChange: r
  });
  return /* @__PURE__ */ F.createElement(mm, {
    scope: e.__scopeToggleGroup,
    type: "single",
    value: c ? [
      c
    ] : [],
    onItemActivate: s,
    onItemDeactivate: F.useCallback(
      () => s(""),
      [
        s
      ]
    )
  }, /* @__PURE__ */ F.createElement(vm, S({}, a, {
    ref: t
  })));
}), QS = /* @__PURE__ */ F.forwardRef((e, t) => {
  const { value: n, defaultValue: o, onValueChange: r = () => {
  }, ...a } = e, [c = [], s] = Se({
    prop: n,
    defaultProp: o,
    onChange: r
  }), i = F.useCallback(
    (u) => s(
      (d = []) => [
        ...d,
        u
      ]
    ),
    [
      s
    ]
  ), l = F.useCallback(
    (u) => s(
      (d = []) => d.filter(
        (f) => f !== u
      )
    ),
    [
      s
    ]
  );
  return /* @__PURE__ */ F.createElement(mm, {
    scope: e.__scopeToggleGroup,
    type: "multiple",
    value: c,
    onItemActivate: i,
    onItemDeactivate: l
  }, /* @__PURE__ */ F.createElement(vm, S({}, a, {
    ref: t
  })));
}), [JS, e7] = fm(Ur), vm = /* @__PURE__ */ F.forwardRef((e, t) => {
  const { __scopeToggleGroup: n, disabled: o = !1, rovingFocus: r = !0, orientation: a, dir: c, loop: s = !0, ...i } = e, l = pm(n), u = rt(c), d = {
    role: "group",
    dir: u,
    ...i
  };
  return /* @__PURE__ */ F.createElement(JS, {
    scope: n,
    rovingFocus: r,
    disabled: o
  }, r ? /* @__PURE__ */ F.createElement(So, S({
    asChild: !0
  }, l, {
    orientation: a,
    dir: u,
    loop: s
  }), /* @__PURE__ */ F.createElement(Z.div, S({}, d, {
    ref: t
  }))) : /* @__PURE__ */ F.createElement(Z.div, S({}, d, {
    ref: t
  })));
}), Qa = "ToggleGroupItem", t7 = /* @__PURE__ */ F.forwardRef((e, t) => {
  const n = bm(Qa, e.__scopeToggleGroup), o = e7(Qa, e.__scopeToggleGroup), r = pm(e.__scopeToggleGroup), a = n.value.includes(e.value), c = o.disabled || e.disabled, s = {
    ...e,
    pressed: a,
    disabled: c
  }, i = F.useRef(null);
  return o.rovingFocus ? /* @__PURE__ */ F.createElement(Eo, S({
    asChild: !0
  }, r, {
    focusable: !c,
    active: a,
    ref: i
  }), /* @__PURE__ */ F.createElement(Mi, S({}, s, {
    ref: t
  }))) : /* @__PURE__ */ F.createElement(Mi, S({}, s, {
    ref: t
  }));
}), Mi = /* @__PURE__ */ F.forwardRef((e, t) => {
  const { __scopeToggleGroup: n, value: o, ...r } = e, a = bm(Qa, n), c = {
    role: "radio",
    "aria-checked": e.pressed,
    "aria-pressed": void 0
  }, s = a.type === "single" ? c : void 0;
  return /* @__PURE__ */ F.createElement(dm, S({}, s, r, {
    ref: t,
    onPressedChange: (i) => {
      i ? a.onItemActivate(o) : a.onItemDeactivate(o);
    }
  }));
}), gm = qS, hm = t7, $m = kt(
  "inline-flex items-center justify-center rounded-md text-sm font-medium ring-offset-background transition-colors hover:bg-muted hover:text-muted-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 data-[state=on]:bg-accent data-[state=on]:text-accent-foreground",
  {
    variants: {
      variant: {
        default: "bg-transparent",
        outline: "border border-input bg-transparent hover:bg-accent hover:text-accent-foreground"
      },
      size: {
        default: "h-10 px-3",
        sm: "h-9 px-2.5",
        lg: "h-11 px-5"
      }
    },
    defaultVariants: {
      variant: "default",
      size: "default"
    }
  }
), n7 = w.forwardRef(({ className: e, variant: t, size: n, ...o }, r) => /* @__PURE__ */ P(
  um,
  {
    ref: r,
    className: M($m({ variant: t, size: n, className: e })),
    ...o
  }
));
n7.displayName = um.displayName;
const xm = w.createContext({
  size: "default",
  variant: "default"
}), o7 = w.forwardRef(({ className: e, variant: t, size: n, children: o, ...r }, a) => /* @__PURE__ */ P(
  gm,
  {
    ref: a,
    className: M("flex items-center justify-center gap-1", e),
    ...r,
    children: /* @__PURE__ */ P(xm.Provider, { value: { variant: t, size: n }, children: o })
  }
));
o7.displayName = gm.displayName;
const r7 = w.forwardRef(({ className: e, children: t, variant: n, size: o, ...r }, a) => {
  const c = w.useContext(xm);
  return /* @__PURE__ */ P(
    hm,
    {
      ref: a,
      className: M($m({
        variant: c.variant || n,
        size: c.size || o
      }), e),
      ...r,
      children: t
    }
  );
});
r7.displayName = hm.displayName;
const [Wr, ZE] = we("Tooltip", [
  lt
]), bs = lt(), a7 = "TooltipProvider", c7 = 700, Ja = "tooltip.open", [s7, vs] = Wr(a7), i7 = (e) => {
  const { __scopeTooltip: t, delayDuration: n = c7, skipDelayDuration: o = 300, disableHoverableContent: r = !1, children: a } = e, [c, s] = q(!0), i = A(!1), l = A(0);
  return j(() => {
    const u = l.current;
    return () => window.clearTimeout(u);
  }, []), /* @__PURE__ */ v(s7, {
    scope: t,
    isOpenDelayed: c,
    delayDuration: n,
    onOpen: re(() => {
      window.clearTimeout(l.current), s(!1);
    }, []),
    onClose: re(() => {
      window.clearTimeout(l.current), l.current = window.setTimeout(
        () => s(!0),
        o
      );
    }, [
      o
    ]),
    isPointerInTransitRef: i,
    onPointerInTransitChange: re((u) => {
      i.current = u;
    }, []),
    disableHoverableContent: r
  }, a);
}, gs = "Tooltip", [l7, jr] = Wr(gs), d7 = (e) => {
  const { __scopeTooltip: t, children: n, open: o, defaultOpen: r = !1, onOpenChange: a, disableHoverableContent: c, delayDuration: s } = e, i = vs(gs, e.__scopeTooltip), l = bs(t), [u, d] = q(null), f = Me(), m = A(0), b = c ?? i.disableHoverableContent, p = s ?? i.delayDuration, g = A(!1), [h = !1, $] = Se({
    prop: o,
    defaultProp: r,
    onChange: (T) => {
      T ? (i.onOpen(), document.dispatchEvent(new CustomEvent(Ja))) : i.onClose(), a == null || a(T);
    }
  }), x = Fe(() => h ? g.current ? "delayed-open" : "instant-open" : "closed", [
    h
  ]), C = re(() => {
    window.clearTimeout(m.current), g.current = !1, $(!0);
  }, [
    $
  ]), y = re(() => {
    window.clearTimeout(m.current), $(!1);
  }, [
    $
  ]), E = re(() => {
    window.clearTimeout(m.current), m.current = window.setTimeout(() => {
      g.current = !0, $(!0);
    }, p);
  }, [
    p,
    $
  ]);
  return j(() => () => window.clearTimeout(m.current), []), /* @__PURE__ */ v(An, l, /* @__PURE__ */ v(l7, {
    scope: t,
    contentId: f,
    open: h,
    stateAttribute: x,
    trigger: u,
    onTriggerChange: d,
    onTriggerEnter: re(() => {
      i.isOpenDelayed ? E() : C();
    }, [
      i.isOpenDelayed,
      E,
      C
    ]),
    onTriggerLeave: re(() => {
      b ? y() : window.clearTimeout(m.current);
    }, [
      y,
      b
    ]),
    onOpen: C,
    onClose: y,
    disableHoverableContent: b
  }, n));
}, Di = "TooltipTrigger", u7 = /* @__PURE__ */ _((e, t) => {
  const { __scopeTooltip: n, ...o } = e, r = jr(Di, n), a = vs(Di, n), c = bs(n), s = A(null), i = ae(t, s, r.onTriggerChange), l = A(!1), u = A(!1), d = re(
    () => l.current = !1,
    []
  );
  return j(() => () => document.removeEventListener("pointerup", d), [
    d
  ]), /* @__PURE__ */ v(yo, S({
    asChild: !0
  }, c), /* @__PURE__ */ v(Z.button, S({
    // We purposefully avoid adding `type=button` here because tooltip triggers are also
    // commonly anchors and the anchor `type` attribute signifies MIME type.
    "aria-describedby": r.open ? r.contentId : void 0,
    "data-state": r.stateAttribute
  }, o, {
    ref: i,
    onPointerMove: O(e.onPointerMove, (f) => {
      f.pointerType !== "touch" && !u.current && !a.isPointerInTransitRef.current && (r.onTriggerEnter(), u.current = !0);
    }),
    onPointerLeave: O(e.onPointerLeave, () => {
      r.onTriggerLeave(), u.current = !1;
    }),
    onPointerDown: O(e.onPointerDown, () => {
      l.current = !0, document.addEventListener("pointerup", d, {
        once: !0
      });
    }),
    onFocus: O(e.onFocus, () => {
      l.current || r.onOpen();
    }),
    onBlur: O(e.onBlur, r.onClose),
    onClick: O(e.onClick, r.onClose)
  })));
}), f7 = "TooltipPortal", [QE, p7] = Wr(f7, {
  forceMount: void 0
}), uo = "TooltipContent", m7 = /* @__PURE__ */ _((e, t) => {
  const n = p7(uo, e.__scopeTooltip), { forceMount: o = n.forceMount, side: r = "top", ...a } = e, c = jr(uo, e.__scopeTooltip);
  return /* @__PURE__ */ v(Ee, {
    present: o || c.open
  }, c.disableHoverableContent ? /* @__PURE__ */ v(wm, S({
    side: r
  }, a, {
    ref: t
  })) : /* @__PURE__ */ v(b7, S({
    side: r
  }, a, {
    ref: t
  })));
}), b7 = /* @__PURE__ */ _((e, t) => {
  const n = jr(uo, e.__scopeTooltip), o = vs(uo, e.__scopeTooltip), r = A(null), a = ae(t, r), [c, s] = q(null), { trigger: i, onClose: l } = n, u = r.current, { onPointerInTransitChange: d } = o, f = re(() => {
    s(null), d(!1);
  }, [
    d
  ]), m = re((b, p) => {
    const g = b.currentTarget, h = {
      x: b.clientX,
      y: b.clientY
    }, $ = g7(h, g.getBoundingClientRect()), x = h7(h, $), C = $7(p.getBoundingClientRect()), y = w7([
      ...x,
      ...C
    ]);
    s(y), d(!0);
  }, [
    d
  ]);
  return j(() => () => f(), [
    f
  ]), j(() => {
    if (i && u) {
      const b = (g) => m(g, u), p = (g) => m(g, i);
      return i.addEventListener("pointerleave", b), u.addEventListener("pointerleave", p), () => {
        i.removeEventListener("pointerleave", b), u.removeEventListener("pointerleave", p);
      };
    }
  }, [
    i,
    u,
    m,
    f
  ]), j(() => {
    if (c) {
      const b = (p) => {
        const g = p.target, h = {
          x: p.clientX,
          y: p.clientY
        }, $ = (i == null ? void 0 : i.contains(g)) || (u == null ? void 0 : u.contains(g)), x = !x7(h, c);
        $ ? f() : x && (f(), l());
      };
      return document.addEventListener("pointermove", b), () => document.removeEventListener("pointermove", b);
    }
  }, [
    i,
    u,
    c,
    l,
    f
  ]), /* @__PURE__ */ v(wm, S({}, e, {
    ref: a
  }));
}), [v7, JE] = Wr(gs, {
  isInside: !1
}), wm = /* @__PURE__ */ _((e, t) => {
  const { __scopeTooltip: n, children: o, "aria-label": r, onEscapeKeyDown: a, onPointerDownOutside: c, ...s } = e, i = jr(uo, n), l = bs(n), { onClose: u } = i;
  return j(() => (document.addEventListener(Ja, u), () => document.removeEventListener(Ja, u)), [
    u
  ]), j(() => {
    if (i.trigger) {
      const d = (f) => {
        const m = f.target;
        m != null && m.contains(i.trigger) && u();
      };
      return window.addEventListener("scroll", d, {
        capture: !0
      }), () => window.removeEventListener("scroll", d, {
        capture: !0
      });
    }
  }, [
    i.trigger,
    u
  ]), /* @__PURE__ */ v(Ot, {
    asChild: !0,
    disableOutsidePointerEvents: !1,
    onEscapeKeyDown: a,
    onPointerDownOutside: c,
    onFocusOutside: (d) => d.preventDefault(),
    onDismiss: u
  }, /* @__PURE__ */ v(Co, S({
    "data-state": i.stateAttribute
  }, l, s, {
    ref: t,
    style: {
      ...s.style,
      "--radix-tooltip-content-transform-origin": "var(--radix-popper-transform-origin)",
      "--radix-tooltip-content-available-width": "var(--radix-popper-available-width)",
      "--radix-tooltip-content-available-height": "var(--radix-popper-available-height)",
      "--radix-tooltip-trigger-width": "var(--radix-popper-anchor-width)",
      "--radix-tooltip-trigger-height": "var(--radix-popper-anchor-height)"
    }
  }), /* @__PURE__ */ v(oc, null, o), /* @__PURE__ */ v(v7, {
    scope: n,
    isInside: !0
  }, /* @__PURE__ */ v(Gu, {
    id: i.contentId,
    role: "tooltip"
  }, r || o))));
});
function g7(e, t) {
  const n = Math.abs(t.top - e.y), o = Math.abs(t.bottom - e.y), r = Math.abs(t.right - e.x), a = Math.abs(t.left - e.x);
  switch (Math.min(n, o, r, a)) {
    case a:
      return "left";
    case r:
      return "right";
    case n:
      return "top";
    case o:
      return "bottom";
    default:
      throw new Error("unreachable");
  }
}
function h7(e, t, n = 5) {
  const o = [];
  switch (t) {
    case "top":
      o.push({
        x: e.x - n,
        y: e.y + n
      }, {
        x: e.x + n,
        y: e.y + n
      });
      break;
    case "bottom":
      o.push({
        x: e.x - n,
        y: e.y - n
      }, {
        x: e.x + n,
        y: e.y - n
      });
      break;
    case "left":
      o.push({
        x: e.x + n,
        y: e.y - n
      }, {
        x: e.x + n,
        y: e.y + n
      });
      break;
    case "right":
      o.push({
        x: e.x - n,
        y: e.y - n
      }, {
        x: e.x - n,
        y: e.y + n
      });
      break;
  }
  return o;
}
function $7(e) {
  const { top: t, right: n, bottom: o, left: r } = e;
  return [
    {
      x: r,
      y: t
    },
    {
      x: n,
      y: t
    },
    {
      x: n,
      y: o
    },
    {
      x: r,
      y: o
    }
  ];
}
function x7(e, t) {
  const { x: n, y: o } = e;
  let r = !1;
  for (let a = 0, c = t.length - 1; a < t.length; c = a++) {
    const s = t[a].x, i = t[a].y, l = t[c].x, u = t[c].y;
    i > o != u > o && n < (l - s) * (o - i) / (u - i) + s && (r = !r);
  }
  return r;
}
function w7(e) {
  const t = e.slice();
  return t.sort((n, o) => n.x < o.x ? -1 : n.x > o.x ? 1 : n.y < o.y ? -1 : n.y > o.y ? 1 : 0), y7(t);
}
function y7(e) {
  if (e.length <= 1)
    return e.slice();
  const t = [];
  for (let o = 0; o < e.length; o++) {
    const r = e[o];
    for (; t.length >= 2; ) {
      const a = t[t.length - 1], c = t[t.length - 2];
      if ((a.x - c.x) * (r.y - c.y) >= (a.y - c.y) * (r.x - c.x))
        t.pop();
      else
        break;
    }
    t.push(r);
  }
  t.pop();
  const n = [];
  for (let o = e.length - 1; o >= 0; o--) {
    const r = e[o];
    for (; n.length >= 2; ) {
      const a = n[n.length - 1], c = n[n.length - 2];
      if ((a.x - c.x) * (r.y - c.y) >= (a.y - c.y) * (r.x - c.x))
        n.pop();
      else
        break;
    }
    n.push(r);
  }
  return n.pop(), t.length === 1 && n.length === 1 && t[0].x === n[0].x && t[0].y === n[0].y ? t : t.concat(n);
}
const C7 = i7, S7 = d7, E7 = u7, ym = m7, eP = C7, tP = S7, nP = E7, P7 = w.forwardRef(({ className: e, sideOffset: t = 4, ...n }, o) => /* @__PURE__ */ P(
  ym,
  {
    ref: o,
    sideOffset: t,
    className: M(
      "z-50 overflow-hidden rounded-md border bg-popover px-3 py-1.5 text-sm text-popover-foreground shadow-md animate-in fade-in-0 zoom-in-95 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",
      e
    ),
    ...n
  }
));
P7.displayName = ym.displayName;
export {
  A7 as Accordion,
  Zb as AccordionContent,
  Xb as AccordionItem,
  qb as AccordionTrigger,
  Og as Alert,
  Lg as AlertDescription,
  I7 as AlertDialog,
  Mg as AlertDialogAction,
  Dg as AlertDialogCancel,
  _g as AlertDialogContent,
  Ag as AlertDialogDescription,
  Ng as AlertDialogFooter,
  Tg as AlertDialogHeader,
  Nl as AlertDialogOverlay,
  Pg as AlertDialogPortal,
  Rg as AlertDialogTitle,
  O7 as AlertDialogTrigger,
  kg as AlertTitle,
  k7 as AspectRatio,
  Yg as Avatar,
  qg as AvatarFallback,
  Xg as AvatarImage,
  F7 as Badge,
  mc as Button,
  Qg as Card,
  n0 as CardContent,
  t0 as CardDescription,
  o0 as CardFooter,
  Jg as CardHeader,
  e0 as CardTitle,
  F0 as Carousel,
  z0 as CarouselContent,
  V0 as CarouselItem,
  B0 as CarouselNext,
  H0 as CarouselPrevious,
  Z0 as Checkbox,
  V7 as Collapsible,
  B7 as CollapsibleContent,
  H7 as CollapsibleTrigger,
  ud as Command,
  W7 as CommandDialog,
  A$ as CommandEmpty,
  M$ as CommandGroup,
  N$ as CommandInput,
  I$ as CommandItem,
  R$ as CommandList,
  D$ as CommandSeparator,
  O$ as CommandShortcut,
  X7 as ContextMenu,
  nw as ContextMenuCheckboxItem,
  ew as ContextMenuContent,
  Z7 as ContextMenuGroup,
  tw as ContextMenuItem,
  rw as ContextMenuLabel,
  Q7 as ContextMenuPortal,
  eE as ContextMenuRadioGroup,
  ow as ContextMenuRadioItem,
  aw as ContextMenuSeparator,
  cw as ContextMenuShortcut,
  J7 as ContextMenuSub,
  Jx as ContextMenuSubContent,
  Qx as ContextMenuSubTrigger,
  q7 as ContextMenuTrigger,
  C$ as Dialog,
  U7 as DialogClose,
  dd as DialogContent,
  T$ as DialogDescription,
  P$ as DialogFooter,
  E$ as DialogHeader,
  ld as DialogOverlay,
  S$ as DialogPortal,
  _$ as DialogTitle,
  G7 as DialogTrigger,
  Pw as Drawer,
  nE as DrawerClose,
  Tw as DrawerContent,
  Mw as DrawerDescription,
  Rw as DrawerFooter,
  Nw as DrawerHeader,
  uu as DrawerOverlay,
  _w as DrawerPortal,
  Aw as DrawerTitle,
  tE as DrawerTrigger,
  rE as DropdownMenu,
  sy as DropdownMenuCheckboxItem,
  ay as DropdownMenuContent,
  cE as DropdownMenuGroup,
  cy as DropdownMenuItem,
  ly as DropdownMenuLabel,
  sE as DropdownMenuPortal,
  lE as DropdownMenuRadioGroup,
  iy as DropdownMenuRadioItem,
  dy as DropdownMenuSeparator,
  uy as DropdownMenuShortcut,
  iE as DropdownMenuSub,
  ry as DropdownMenuSubContent,
  oy as DropdownMenuSubTrigger,
  aE as DropdownMenuTrigger,
  fE as HoverCard,
  Cy as HoverCardContent,
  pE as HoverCardTrigger,
  Sy as Input,
  _y as Label,
  Jy as Menubar,
  aC as MenubarCheckboxItem,
  oC as MenubarContent,
  vE as MenubarGroup,
  rC as MenubarItem,
  sC as MenubarLabel,
  bE as MenubarMenu,
  gE as MenubarPortal,
  $E as MenubarRadioGroup,
  cC as MenubarRadioItem,
  iC as MenubarSeparator,
  lC as MenubarShortcut,
  hE as MenubarSub,
  nC as MenubarSubContent,
  tC as MenubarSubTrigger,
  eC as MenubarTrigger,
  VC as NavigationMenu,
  zC as NavigationMenuContent,
  HC as NavigationMenuIndicator,
  wE as NavigationMenuItem,
  yE as NavigationMenuLink,
  kC as NavigationMenuList,
  FC as NavigationMenuTrigger,
  cf as NavigationMenuViewport,
  CE as Pagination,
  BC as PaginationContent,
  EE as PaginationEllipsis,
  sf as PaginationItem,
  cs as PaginationLink,
  SE as PaginationNext,
  KC as PaginationPrevious,
  _E as Popover,
  o2 as PopoverContent,
  TE as PopoverTrigger,
  p2 as Progress,
  R2 as RadioGroup,
  A2 as RadioGroupItem,
  IE as ResizableHandle,
  DE as ResizablePanel,
  ME as ResizablePanelGroup,
  m5 as ScrollArea,
  ap as ScrollBar,
  LE as Select,
  o6 as SelectContent,
  FE as SelectGroup,
  a6 as SelectItem,
  r6 as SelectLabel,
  wp as SelectScrollDownButton,
  xp as SelectScrollUpButton,
  c6 as SelectSeparator,
  n6 as SelectTrigger,
  zE as SelectValue,
  l6 as Separator,
  VE as Sheet,
  BE as SheetClose,
  f6 as SheetContent,
  v6 as SheetDescription,
  m6 as SheetFooter,
  p6 as SheetHeader,
  Ep as SheetOverlay,
  d6 as SheetPortal,
  b6 as SheetTitle,
  HE as SheetTrigger,
  KE as Skeleton,
  V6 as Slider,
  X6 as Switch,
  q6 as Table,
  Q6 as TableBody,
  oS as TableCaption,
  nS as TableCell,
  J6 as TableFooter,
  tS as TableHead,
  Z6 as TableHeader,
  eS as TableRow,
  jE as Tabs,
  vS as TabsContent,
  mS as TabsList,
  bS as TabsTrigger,
  gS as Textarea,
  cm as Toast,
  KS as ToastAction,
  sm as ToastClose,
  lm as ToastDescription,
  HS as ToastProvider,
  im as ToastTitle,
  am as ToastViewport,
  XE as Toaster,
  n7 as Toggle,
  o7 as ToggleGroup,
  r7 as ToggleGroupItem,
  tP as Tooltip,
  P7 as TooltipContent,
  eP as TooltipProvider,
  nP as TooltipTrigger,
  Zg as badgeVariants,
  Sr as buttonVariants,
  LC as navigationMenuTriggerStyle,
  jS as reducer,
  YS as toast,
  $m as toggleVariants,
  XS as useToast
};
